Safety
Is it safe to delete the npm cache?
Yes. The cache is a download accelerator, not your app. Clearing it is one of the safest reclaim moves on a full SSD.
Manual clear
npm cache verify npm cache clean --force # typical location # macOS/Linux: ~/.npm # Windows: %LocalAppData%\npm-cache
What it does not do
- It does not remove
node_modulesinside projects. - It does not uninstall global packages.
- It does not fix wrong versions in package.json.
FAQ
Is it safe to delete the npm cache?
Yes. npm cache clean --force removes cached tarballs. The next install re-downloads packages. It does not delete your project node_modules.
Will this fix a broken install?
Sometimes. Clearing the cache helps corrupt tarball cases. For dependency issues, delete node_modules and lockfile carefully in the project instead.