I tried to get the number of available brew packages by running

brew search | wc -l

but I don't know how accurate this really is. What do I need to take into account to get a more correct number?

PS: macports lists 19,889 packages online here

  • Asking for "what is the output of brew search | wc -l" is off-topic as it doesn't show any kind of research on your part (you can easily run this yourself) nor does it seem to be related to a practical problem.That's why I (as well as @bmike) edited it into something which might be of interest to a wider audience. Please have a look at apple.stackexchange.com/help/editing to understand why editing happens.
    – nohillside
    May 4, 2018 at 13:13
  • @patrix, I'd have to install macOS first. May 5, 2018 at 0:31
  • So it's a kind of hypothetical question then :-) brew is just a bunch of shell and ruby scripts, will run anywhere with some tweaking. And the result is changing daily, right now it's 4557.
    – nohillside
    May 5, 2018 at 7:08
  • This is really a Wikipedia question so let’s pause it in time. There is an answer that explains well how the system functions, so there’s no need to delete this.
    – bmike
    Jun 22, 2019 at 19:20

1 Answer 1


On June 23, 2019 the soon to be incorrect count of packages is 4804.

Since many people add and remove packages, this count shifts by dozens a day and sometimes hundreds at a time when larger changes move packages out of the mainstream repository into a sub repository that can be "tapped" to increase the count.

Homebrew uses a concept called tap, which is simply a repository containing a list of formulae that it tracks, updates, and installs from. The default installation of Homebrew comes with a tap called homebrew/core but there's no limit to how many or how large a tap you could source packages since they can be self hosted pretty much anywhere.

Running brew [command] [options] runs the command on homebrew/core tap. There are various other official and unofficial taps from which packages can be installed.

The total count of packages in any tap keeps changing as new packages (called formula) are added, deleted or updated. To get the current count, first update the local homebrew/core tap repository by running:

brew update.

Now execute your command-line:

brew search | wc -l

to get the current count of packages in the homebrew/core tap. Running brew search without any arguments lists all the packages (formula).

  • I've edited the question a bit to make it more general. Do you have any details on how to get a list of taps and the number of packages within them you could add?
    – nohillside
    May 3, 2018 at 12:21
  • 1
    Thanks for the edit @patrix. Due to the way Homebrew is designed, there is no fixed set of taps. A tap can be easily created with the help of a hosted git repository and an installation of Homebrew can tap into it! There are a few official taps maintained by Homebrew community, but no website (even official) publishes the count of formula in a tap as it is highly dynamic.
    – Nimesh Neema
    May 3, 2018 at 19:37

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