DiskBroom › What it cleans › How to safely clear npm, pnpm, and Yarn caches
~/.npm · ~/Library/Caches/pnpm · ~/Library/Caches/Yarn
Every package your projects install is kept as a compressed copy so future installs skip the network. npm calls it _cacache, pnpm keeps a content-addressed store, Yarn keeps tarballs — the idea is identical.
Commonly 1–5 GB per package manager; on this machine's most recent scan, the npm cache alone was 2.86 GB. Heavy monorepo work pushes higher.
Completely safe: caches re-fill from the registry as you install. Your node_modules folders and lockfiles are untouched — the only cost is slower first installs while the cache warms back up.
Safe. Pure re-downloadable cache, verified by checksums on the way back in. Nothing unique ever lives here.
Prefer not to do this by hand every time? DiskBroom scans this location (and every other one on its published list), shows the size, rates the risk with the same shape you see above, and asks before anything moves — everything goes to the Trash, never past it. Scanning is free forever.
Something missing, or wrong in this guide? Request a feature · Report a problem