How to Find Where Homebrew Packages Are Installed on Mac
How to Find Where Homebrew Packages Are Installed on Mac
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 youre a , you may be interested in knowing where Homebrew puts everything and where to find the installed in Mac OS.
Well 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. This is obviously aimed at more advanced Mac users who rely on the command line and Homebrew, and this wont be applicable to anyone else.
Where Homebrew Packages Are Installed on Mac
If youre interested in . By default, Homebrew will install all packages into the following directory in all versions of Mac OS: Additionally, Homebrew places symlinks into the following directory path: 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:
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: Now that you know where Homebrew generally stores packages, you can also learn more specifics about particular packages.
Well 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.
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: For example, using the package wget we can get the following information immediately: As you can see in the command output, only the installation path for that Homebrew package is shown.
Where Homebrew Packages Are Installed on Mac
If youre 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: For example, if you wanted to get information about the Homebrew package wget then you would issue the following command: 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.
Where Homebrew Packages Are Installed on Mac
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. Try these commands yourself with any Homebrew package.
If you followed our prior articles about and then checked out some of the available, or perhaps updated to or through Homebrew, these tips will work to show you the installation path of those packages, as well as other noteworthy package information. Do you have interesting advice or information to share on finding where Homebrew installs packages onto a Mac, or retrieving package details? Share with us in the comments below!
Where Homebrew Packages Are Installed on Mac
No comments