I'd like to check the version of GCC on my macOS, found this command:

$ gcc -dumpversion | cut -f1 -f2 -f3 -d

If I want to check my brew-installed GCC --version (or any other app) what would be the command?

Thank you!


1 Answer 1


To see which version(s) of a particular utility you have installed using brew, e.g. gcc, use:

brew list --versions gcc
  • works only last argument - gcc
    – Mark
    Commented Apr 12, 2022 at 12:43
  • Just logging that --casks is needed for casks - duh Example brew list --versions --casks netbeans
    – Rafs
    Commented Jul 10, 2023 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .