How to get the version of brew itself

I see flags brew -v or brew --version don’t exist. How do I check it, if possible the brew itself version?

My mistake apparently both exist, but not sure if it’s the version installed on the system or the latest available from git:

brew -v
Homebrew 2.2.17
Homebrew/homebrew-core (git revision 20d2a8; last commit 2020-05-19)

Homebrew uses git describe to format its versions, so if you were on master it’d look like e.g. 2.2.17-7-g9de07ea. If you want to always be on the latest commit, set HOMEBREW_DEVELOPER=1 in your environment. See the manpage for more details on environment variables.

1 Like

Ok but you didn’t answer my question. That -v does display installed version or does display latest repo version available when last version check was performed (without actually updating system just version check)? Or it’s just something else?

No, homebrew does the same thing as any other program and only returns the current program version if you call brew --version. If you want more info you could call brew config

1 Like

Thank you that’s the answer I was looking for.