Package manager caches are safe to clear because packages are downloaded again when needed. Use each tool’s own command: brew cleanup, npm cache clean --force, pip cache purge, yarn cache clean, pnpm store prune. The next install of a package may just take a little longer.
The five questions
Downloaded copies of code packages kept by Homebrew, npm, pip and Yarn.
Every version you ever installed is kept, just in case.
Yes. They're downloaded again when needed.
The next install of a package may take a little longer.
Yes, as you install things.
How big it gets: 2–30 GB on developer Macs. pnpm stores and npm’s _cacache are often the largest.
Where it lives: ~/Library/Caches/Homebrew, ~/.npm/_cacache, ~/Library/Caches/pip, ~/Library/Caches/Yarn, ~/Library/Caches/pnpm, ~/Library/pnpm/store, ~/Library/Caches/CocoaPods, ~/.bun/install/cache, ~/Library/Caches/go-build
The commands, in one place
brew cleanup -s
npm cache clean --force
pip cache purge
yarn cache clean
pnpm store pruneDo it yourself
Open Terminal and type brew cleanup, then npm cache clean --force, then pip cache purge.
brew cleanup && npm cache clean --forceSee your own developer package caches in seconds
Scan free, see every part of your storage explained, and clean only what’s safe. Everything goes to the Trash first.
Frequently asked questions
Is it safe to delete developer package caches on a Mac?
Yes. They're downloaded again when needed.
Why are my developer package caches so big?
Every version you ever installed is kept, just in case.
What happens after I remove developer package caches?
The next install of a package may take a little longer.
Will developer package caches come back?
Yes, as you install things.
How do I clean developer package caches manually?
Open Terminal and type brew cleanup, then npm cache clean --force, then pip cache purge.