Sparewise

The npm cache is huge: is it safe to clear?

Short answer: yes. npm's cache (%LocalAppData%\npm-cache) only holds copies of packages it downloaded. Clear it and npm downloads what it needs again on the next install. It costs only time and bandwidth.

By hand

  1. Check it: npm cache verify (this also tidies it).
  2. Clear it: npm cache clean --force
  3. pnpm and Yarn keep their own: pnpm store prune, yarn cache clean.
  4. Often bigger are the node_modules folders in old projects. Those belong to each project, so delete them only in projects you no longer work on.

With Sparewise

Sparewise does this safely

Download for Windows

Free · No admin rights · No telemetry · Everything it moves can be put back