Homebrew storage on a Mac: measure Cellar, Caskroom and cache, then clean them safely

By the Zofle team · 10 November 2026 · 4 min read

Homebrew Cellar, Caskroom and download cache measured before cleanup

Homebrew can use 20 GB without one giant file. Formula versions sit in Cellar, cask staging files sit in Caskroom, and downloaded bottles and app installers sit in a separate cache. Measure all three before deleting anything.

The safe five-minute version

bash
# Homebrew chooses the right paths for Apple silicon or Intel
brew --prefix
brew --cellar
brew --caskroom
brew --cache

# measure each place
du -sh "$(brew --cellar)" "$(brew --caskroom)" "$(brew --cache)"

# preview, then clean old versions and downloads
brew cleanup --dry-run
brew cleanup

Do not hard-code /opt/homebrew or /usr/local. Apple silicon normally uses /opt/homebrew; Intel normally uses /usr/local; the brew --... commands also handle a custom installation.

What each folder holds

PlaceWhat is in itSafe first move
CellarVersioned formula packages and their dependenciesbrew cleanup --dry-run
CaskroomVersioned cask staging directories; many apps themselves live in ApplicationsUninstall an unused cask with brew uninstall --cask name
CacheDownloaded bottles, source archives and cask installersbrew cleanup, or prune more aggressively after previewing
TapsPackage definitions; usually smallbrew untap owner/repo only when no installed package needs it

Find the packages taking the space

bash
# Homebrew's own installed-size list
brew list --formula --sizes | sort -h -k2
brew list --cask --sizes | sort -h -k2

# largest top-level folders, read only
du -sh "$(brew --cellar)"/* 2>/dev/null | sort -h | tail -20
du -sh "$(brew --caskroom)"/* 2>/dev/null | sort -h | tail -20

Read the last lines first. A large formula may be required by several smaller ones, so check before removing it: brew uses --installed package-name.

A worked 24 GB example

Measured placeBeforeAfter cleanupRecovered
Cellar13.0 GB9.5 GB3.5 GB
Caskroom4.0 GB2.5 GB1.5 GB
Cache7.0 GB0.8 GB6.2 GB
Total24.0 GB12.8 GB11.2 GB

This is a worked example, not a reading from your Mac. The arithmetic is 24.0 - 12.8 = 11.2 GB recovered, or 4.4% of a 256 GB SSD. Put your own du results into the same table.

Choose how far to clean

  • Normal: brew cleanup removes old formula versions, stale locks and downloads older than Homebrew's cleanup age. Current documentation says the default age is 120 days.
  • All old cache files: preview brew cleanup --prune=all --dry-run, then run it without --dry-run. You may need to download installers again later.
  • One package: brew cleanup package-name.
  • Unused dependencies: inspect brew autoremove --dry-run, then run brew autoremove.
  • Package you no longer use: brew uninstall name or brew uninstall --cask name, then run cleanup.

Don't do these

  • Do not run sudo brew .... Homebrew warns that this gives package code root access.
  • Do not delete Cellar folders by hand. Homebrew tracks links and dependencies; use brew uninstall and brew cleanup.
  • Do not assume Caskroom is the whole app size. A cask may place the actual app in /Applications.
  • Do not use brew uninstall --cask --zap just for disk space unless you have checked what its zap stanza removes; it can remove settings and user data.

Check the result

bash
du -sh "$(brew --cellar)" "$(brew --caskroom)" "$(brew --cache)"
brew doctor

If Homebrew is small, look elsewhere instead of cleaning harder. Developers often recover more from Xcode and Simulator storage, while a large System Data number may be purgeable space and local snapshots.

Zofle shows your Mac storage by category so you can compare Homebrew with developer files, caches and downloads before removing anything.

Download Zofle for Mac

Sources and method

  • Homebrew brew manpage: --cellar, --caskroom, --cache, package sizes, cleanup dry-run, 120-day default and prune options.
  • Homebrew FAQ: default prefixes are /opt/homebrew on Apple silicon and /usr/local on Intel; do not run brew with sudo.
  • Sources checked 10 November 2026. The 24 GB table is labelled worked arithmetic, not a machine measurement.

Zofle Pro news

People signing up now will get Zofle Pro, with more features, for free when we launch it.

One email when it's ready. No spam, ever.