npm cache (~/.npm) on Mac: what it is and whether you can delete it
MACMAN FOLDER · 2026-11-16
~/.npm~/.npm/_cacache
What it is
~/.npmReview, then deletenpm home
~/.npm/_cacacheSafe to delete nowPackage cache downloaded by npm — the index and contents are a pair, so it is deleted only as a whole
Why it grows
When npm installs a package, it saves the downloaded files in ~/.npm/_cacache and reuses them on the next install.
npm does not empty this cache on its own, so it keeps growing as you install different package versions across projects. Packages you run with npx also pile up under ~/.npm.
Before you delete
~/.npmDeleting only the _cacache subfolder is safe
How to check its size
In Finder, choose Go > Go to Folder (Shift-Command-G), enter ~/.npm or ~/.npm/_cacache, then use Get Info (Command-I) to see the size.
In Terminal, run du -sh ~/.npm ~/.npm/_cacache to see the size.
The free MacMan Scan diagnosis lists this folder with its size and grade. The scan is read-only.
How to shrink it safely
- Leave the ~/.npm folder itself in place. Other npm files live in it too.
- Move only the _cacache folder inside ~/.npm to the Trash as a whole, then empty the Trash. Its index and contents are a pair, so do not pick out files inside it.
- On the next install npm downloads the packages it needs again. You need an internet connection then.
How MacMan Scan handles this folder
~/.npmMacMan Scan lists the items inside this folder one by one on the cleanup screen, unchecked. It becomes a deletion target only after you look at it and check it yourself.
~/.npm/_cacacheMacMan Scan lists this folder on the cleanup screen, checked by default. Nothing is deleted until you press the delete button yourself.
Related folders
- pnpm store (~/Library/pnpm) on Mac: what it is and whether you can delete it
- Homebrew cache folder on Mac: what it is and how to clear it
- pip cache (~/Library/Caches/pip) on Mac: what it is and whether you can delete it
The scan is read-only. Diagnosis alone deletes nothing.