Is it safe to delete ~/.npm/_cacache?
Your tools make it again on their own. The cost is a slower next run.
- What it is
- Package files npm downloads and keeps so it doesn't have to fetch them again on your next install. npm's own documentation (npm help cache) describes this as a content-addressable cache of “http request data as well as other package-related data.”
- Made by
- npm
- If you remove it
- The next time you install a package that was cached here, npm downloads it from the registry again, that install is slower and needs an internet connection. Packages already installed into a project's node_modules folder are not touched.
- How it comes back
- Run npm install in any project that needs it, npm re-downloads what's missing and rebuilds the cache automatically, though a package version that has since been unpublished from the registry may not come back.
npm install
The tool's own commands
npm cache verify“Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.”From docs.npmjs.com/cli/commands/npm-cache, read 3 Nov 2026.npm cache clean --force“Delete a single entry or all entries out of the cache folder.” npm adds: “it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus whycleannow requires--forceto run.”From docs.npmjs.com/cli/commands/npm-cache, read 3 Nov 2026.
The proof
- Verified by
- vendor documentation
- Checked on
- macOS 26.6.2, npm 10.9.3
- Catalogue
- Spaceific's rules.json 1.2.0, 2 Nov 2026. The whole file.
- Measured
- 2.79 GB on the builder's Mac (6 Oct 2026)
Related
- Cargo registry
~/.cargo/registry - pip cache
~/Library/Caches/pip - pnpm store
~/Library/pnpm/store - npm global
~/.npm-globalNo rule yet - Homebrew cache
~/Library/Caches/HomebrewNo rule yet - rustup toolchains
~/.rustup/toolchainsNo rule yet - conda
~/.condaNo rule yet - swiftpm
~/.swiftpmNo rule yet - Every rule
Spaceific shows this rule for this folder in the app, checks it again at the moment you act, and moves only to the Trash, with Put Back. What Spaceific is.