OptiClear

Developer Tools

Clear Homebrew Cache on Mac

You can clear the Homebrew cache with a single command in Terminal, and it returns space without removing any installed tool. The cache holds only downloads, so Homebrew can always rebuild it.

Last updated: 2 min read

Clear the Homebrew cache without guessing

Homebrew data usually takes 1 GB – 20 GB on a Mac. The free scan shows the exact size on your Mac before you change anything.

Scan your Mac free

Free scan · No account · Nothing is deleted without your OK · Moves to the Trash first · macOS 14+

Application
Homebrew
Typical data size
1 GB – 20 GB
Category
Developer Tools
File Location
~/Library/Caches/Homebrew

Clear it from inside Homebrew first

The safest way is the option built into the app: brew cleanup removes old versions and cached downloads, and brew cleanup --prune=all empties the download cache; neither uninstalls any package.

Homebrew cache folders you can clear

These folders are rebuilt automatically, so removing them does not touch your own files.

Locations are the standard macOS folders Homebrew uses; some appear only after you use the matching feature.

What the Homebrew cache holds

Specific to Homebrew

The cache in ~/Library/Caches/Homebrew stores downloaded bottles, source archives and old package versions that Homebrew kept after upgrades. Its typical size is 1 GB – 20 GB, and it grows with every update you install. Clearing it helps when many old bottles have piled up or when brew cleanup -n lists a lot to remove. Those signs mean the space is mostly leftovers rather than your own files. Installed tools and service data stay where they are.

What happens after you clear the Homebrew cache

Homebrew fetches fresh copies of anything it needs the next time you install or upgrade a package, so that step may take a little longer. The cache is rebuilt automatically as you use the app. Installed formulae and casks keep working, because clearing only removes old versions and cached downloads. Data that services keep, such as database files, is not touched by this command.

0 of 3 done

Try it without risk

  1. Download and scan for freeSee every Homebrew file and its size. No account needed.
  2. Clean free for 7 daysStart the 7-day free trial of the yearly plan inside the app.
  3. Keep it or cancelCancel in your App Store settings at least 24 hours before the trial ends and you won't be charged.
Download free and scan

After the free trial, Pro costs $39.99 per year in your country's App Store; cancel any time.

Frequently asked questions

Yes. Folders marked “Yes, rebuilt automatically” are rebuilt automatically; removing them only makes the next start slower.
Will clearing the cache uninstall my packages?
No. The cleanup commands remove old versions and cached downloads, but they do not uninstall any package.
Why does the next install take longer?
Downloads that were cleared have to be fetched again, so the first install or upgrade afterwards may be slower.

Related cleanup guides