Where apps hide your files
Which folder Homebrew uses depends on your chip, and the real files sit a level below the symlinks you see. Here is the layout, the cache, and the safe way to reclaim space.
Homebrew installs under a prefix, and the prefix depends on the chip. Homebrew's manual gives these defaults:
Apple silicon: /opt/homebrew
Intel: /usr/local
If you are not sure which Mac you have, ask Homebrew itself:
brew --prefix
brew --cellar
brew --repository
On Apple silicon, brew --prefix and brew --repository both print /opt/homebrew and brew --cellar prints /opt/homebrew/Cellar. An Intel install prints /usr/local, /usr/local/Homebrew and /usr/local/Cellar. An Apple silicon Mac migrated from an Intel one, or one where Terminal runs under Rosetta, can end up with both: the M1 Pro used to check this guide has a native install in /opt/homebrew and an Intel install in /usr/local, and which one answers depends on how the shell runs. which -a brew lists every brew your shell can see, the first one being the one it uses. That matters because Homebrew's documentation now classes every Intel setup as Tier 3, meaning not officially supported: new Intel bottles are no longer built, so updated formulae may compile from source, and Homebrew plans to drop Intel in or after September 2027.
To open the prefix, press ⇧⌘G in Finder and paste it, or run open "$(brew --prefix)" in Terminal. Finder never shows these folders when you browse, because macOS marks /opt and /usr as hidden (ls -lO / shows the hidden flag).
| Folder | What it holds |
|---|---|
bin/ | Symlinks to the commands you run, such as brew itself and every installed tool |
Cellar/ | The real files: one folder per formula, then one folder per version |
Caskroom/ | Apps installed with brew install --cask, kept per cask and version |
opt/ | Stable symlinks such as opt/python@3.12 that point at the current version in the Cellar |
lib/, include/, share/, etc/, var/ | Libraries, headers, man pages, config and data, symlinked or written by formulae |
Homebrew/ | The Homebrew code itself, on Intel (on Apple silicon the code sits in the prefix directly) |
The key idea is the symlink farm. A formula such as wget is unpacked to Cellar/wget/<version>/, and Homebrew then links its files into bin/, share/ and the rest. Deleting a symlink in bin/ does not remove the package, and deleting a Cellar folder by hand leaves dangling links behind. brew --cellar prints the Cellar's exact path; the manual gives $(brew --prefix)/Cellar as the default.
GUI apps from casks are different. The .app itself is normally placed in /Applications, with the cask's metadata kept in Caskroom/. So an app you installed as a cask is in /Applications like any other, not inside the Homebrew folder.
Some formulae keep data that must survive upgrades in the prefix rather than the Cellar. Homebrew's Python is the clearest case: its site-packages is a real folder at lib/python3.12/site-packages under the prefix, and the copy inside the Cellar is only a link back to it, so packages are not lost when Python updates. Homebrew's Python is also marked as externally managed, so use a virtual environment or pipx rather than installing into it directly.
Node installed with Homebrew keeps global npm packages under <prefix>/lib/node_modules. If you use a version manager such as nvm instead, the global folder is inside that manager's own directory.
Downloads are cached outside the prefix, in your Library:
~/Library/Caches/Homebrew
Confirm it with brew --cache. Bottles (prebuilt packages) and source downloads stay there after install, which is why it grows. Build logs go to ~/Library/Logs/Homebrew.
Old formula versions in the Cellar are what usually eat space. On the Mac used to check this guide, the older /usr/local Cellar held about 5 GB, the native /opt/homebrew one about 200 MB, and the shared download cache about 100 MB.
Read-only commands first:
du -sh "$(brew --cellar)"/* | sort -h | tail -15
brew list --versions
brew cleanup -n
The -n (dry run) flag on brew cleanup prints what it would remove without removing anything. When the list looks right, brew cleanup deletes old versions of installed formulae, stale lock files and outdated downloads, including any cached download more than 120 days old. Run it from Terminal yourself; it is the supported way to reclaim space. To remove a package completely, use brew uninstall <name> rather than deleting its Cellar folder. For casks, brew uninstall --cask <name>.
Do not move or delete the prefix to "reset" Homebrew. The links in bin/ and opt/ are relative paths into the Cellar, and other tools remember absolute paths into the prefix.
You cannot copy a Homebrew folder from an Intel Mac to an Apple silicon one and expect it to work. The binaries are built for the other architecture and the prefix differs. The supported route is to record what you have and reinstall:
brew bundle dump --file="$HOME/Brewfile"
brew bundle --file="$HOME/Brewfile"
The first command, on the old Mac, writes a list of formulae, casks and taps into Brewfile in your home folder. (The $HOME form matters: a ~ straight after = is not expanded by zsh or bash.) Copy that one file to the new Mac, install Homebrew there, and run the second command. On Apple silicon, Homebrew's installer finishes by printing the line that adds it to your shell, eval "$(/opt/homebrew/bin/brew shellenv)", for you to put in ~/.zprofile.
Finder hides /usr and /opt, so browsing never gets you there. Spotlight is inconsistent here: on the Mac used for this guide it returned hundreds of openssl files from /usr/local but none from /opt/homebrew, where openssl@3 is also installed. Even when it does answer, a search for a tool's name returns man pages, locale files and help topics with that word in them, and the files you can see in bin/ are only symlinks to the real binary a few folders down.
Typing ffmpeg or libpng into Everywhere shows the symlink in bin or lib and the real copy in the Cellar side by side, each with its full path, so you can tell at once which is the link and which holds the files. Press ⌘T on a result to open a Terminal in that folder. It matches names only, so to see everything a formula installed, use brew list <name> instead.
/opt/homebrew. Intel Macs use /usr/local. Run brew --prefix to see which one your Mac uses.
In the Cellar, one folder per formula and version; brew --cellar prints its path. The files in bin and lib under the prefix are symlinks into it.
In ~/Library/Caches/Homebrew, which brew --cache confirms. brew cleanup removes old versions and stale downloads, and brew cleanup -n previews what it would delete.
Not by copying. Binaries are built for one architecture and paths are baked in. Dump a Brewfile, install Homebrew fresh in the new prefix, and run brew bundle with that file.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised