npm cache on Mac: what it is and whether you can delete it
~/.npm/_cacache
Yes, you can delete it without losing anything
It recreates itself: the tool that created it makes it again when needed. At most, the next time takes a little longer.
What it is
Copies of packages npm already installed. It downloads them again if needed.
How to free the space
With the tool's own command: npm cache clean --force
DiskSpace AI finds it for you
It tells you how much it takes on your Mac, what it is and whether you can delete it. It only selects what recreates itself, and your files are kept 7 days in case you change your mind.
Download the BetaGuides that cover it
Similar folders
- uv cache (Python)Recreates itself
- pip cacheRecreates itself
- npx temporary packagesRecreates itself
- pnpm storeRecreates itself
- pnpm cacheRecreates itself
- Yarn cacheRecreates itself