Recently I installed Brew. How can I retrieve a list of available brew packages to install?
8 Answers
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.
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.
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 formulaebrew 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
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:
- Formulas: https://formulae.brew.sh/formula/
- Casks: https://formulae.brew.sh/cask/
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
To list all homebrew packages (whether installed or not):
brew search '/[a-zA-Z]/'
-
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 BotCommented Feb 24, 2023 at 0:54
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 ""
In addition to the terminal commands, the Homebrew website (https://brew.sh) has some pages that I find useful, and also the repo:
- homebrew-core — Homebrew Formulae - a single-page list of all packages available from the core tap via the Homebrew package manager for macOS and Linux.
- homebrew-cask - Homebrew Formulae - a single-page listing of all casks available from the cask tap via the Homebrew package manager for macOS.
- Homebrew Analytics Formula Install Events (30 days) — Homebrew Formulae
a single-page list of all homebrew (from the core tap?) packages (12,919 as of 22 June 2024) installed at least once in the past 30 days, so you can view the relative popularity of packages, ranked by number of installs. (also available are the past 90 days and 365 days) - https://github.com/Homebrew/homebrew-core/tree/master/Formula - the repo for all the core-tap formulae
Screenshots from 22 June 2024: