How to Find Where Homebrew Packages Are Installed on Mac

Have you ever wondered where Homebrew puts the binaries from brew packages that are installed on a Mac? If you’re a Homebrew user, you may be interested in knowing where Homebrew puts everything and where to find the installed brew packages in Mac OS.

We’ll show you the directory path where Homebrew keeps packages, and also share a few other ways to see what and where Homebrew has installed anything onto a Mac.

Where Homebrew Packages Are Installed on Mac OS: the Homebrew Installation Path

By default, Homebrew will install all packages into the following directory in all versions of Mac OS:

/usr/local/Cellar/

Additionally, Homebrew places symlinks into the following directory path:

/usr/local/opt/

The symbolic links of binaries found in /usr/local/opt/ all point to their respective package in /usr/local/Cellar/ as can be confirmed with ls and the -l flag:

ls -l /usr/local/opt/

The screenshot example demonstrates the symbolic links pointing from /usr/local/opt/ to /usr/local/Cellar/ for each individual brew package:

Thus you can use the ls command to list all Homebrew packages installed on a Mac simply by showing the full directory listing:

ls /usr/local/Cellar

How to Find Specific Homebrew Package Installation Information

Now that you know where Homebrew generally stores packages, you can also learn more specifics about particular packages. We’ll show you a few commands to print the exact path of a specific brew package, and also show you how to get additional detailed information about particular Homebrew packages installed on the Mac.

How to Find Exactly Where a Homebrew Package is Installed

If you want the exact path to where a Homebrew package is installed reported back to you via command line, the simplest method is to use the –prefix flag and point it at a particular Homebrew package on the Mac, this will reveal the location where it is installed:

brew --prefix [package]

For example, using the package ‘wget’ we can get the following information immediately:

$ brew --prefix wget
/usr/local/opt/wget

As you can see in the command output, only the installation path for that Homebrew package is shown.

How to Get Detailed Homebrew Package Information

If you’re interested in getting more detailed information about a specific Homebrew package that has been installed, including where the Homebrew package came from, what it is, when it was installed, the path where the brew package is installed, as well as information about that packages dependencies and what other packages are required to use it. This is achieved by using the ‘info’ flag with brew to point it at a specific package, using the following syntax:

brew info [package]

For example, if you wanted to get information about the Homebrew package “wget” then you would issue the following command:

brew info wget

Hitting return will detail information about the brew package. Example output of such a command for ‘wget’ may look like the following:

The ‘brew info’ command obviously reveals significantly more information than simply the installation path of the package, so if you simply want the exact path of an installed brew package the –prefix command may be easier for scripting or other purposes. Nonetheless the full ‘brew info’ command output is incredibly useful to get extensive information about any installed package and it has obvious value for that reason, in addition to showing where something is installed.

This website and third-party tools use cookies for functional, analytical, and advertising purposes. By continuing to browse the site, closing this banner, scrolling this webpage, or clicking a link, you agree to these cookies. You can review our privacy policy for additional information.I AcceptPrivacy Policy