290

Recently I installed Brew. How can I retrieve a list of available brew packages to install?

2

8 Answers 8

400

brew help will show you the list of commands that are available.

brew list will show you the list of installed packages. You can also append formulae, for example brew list postgres will tell you of files installed by postgres (providing it is indeed installed).

brew search <search term> will list the possible packages that you can install. brew search post will return multiple packages that are available to install that have post in their name.

brew info <package name> will display some basic information about the package in question.

0
22

From the man page:

search, -S text|/text/
Perform a substring search of formula names for text. If text is surrounded with slashes,
then it is interpreted as a regular expression. If no search term is given,
all available formula are displayed.

For your purposes, brew search will suffice.

9

Since Homebrew 2.6.0 released in 2020.12.01, brew list behaves a little differently. This is one of the reason I post the following answer.

Installed Packages

Homebrew describes packages as formulae. There's another kind of package know as cask, which is used for GUI apps installed by brew install --cask.

Formerly, brew list will only list installed formulae. After 2.6.0, brew list will list both of packages and casks. You may wanna check them separately

  • brew list --formula
  • brew list --cask

Available Packages

List

  • brew formulae, list all available formulae
  • brew casks, list all casks (These two commands are fast cause it's implemented in Bash not Ruby)

Search

# search local installed
brew search --formula keyword
brew search --cask keyword

# search online available
brew search --formulae keyword
brew search --casks keyword
3

For people who, like me, land here wanting to search the available packages but are not in front of a Mac with a working Homebrew install:

The Homebrew site now has full lists and a search option on Homebrew Formulae.

The full lists are on separate pages for:

0
2

Please use Homebrew Formulae page to see the list of installable packages. https://formulae.brew.sh/formula/

To install any package => command to use is :

brew install node

1

To list all homebrew packages (whether installed or not):

brew search '/[a-zA-Z]/'
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 24, 2023 at 0:54
0

Since some of the other answers have been written quite a few changes have been made to the brew command. It took me a while to figure out, but the following command will list all available packages:

brew search --eval-all --desc ""
0

In addition to the terminal commands, the Homebrew website (https://brew.sh) has some pages that I find useful, and also the repo:

Screenshots from 22 June 2024:

enter image description here enter image description here enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.