npm cache (~/.npm) on Mac: what it is and whether you can delete it

MACMAN FOLDER · 2026-11-16

Review, then delete

What it is

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

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

  1. Leave the ~/.npm folder itself in place. Other npm files live in it too.
  2. 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.
  3. On the next install npm downloads the packages it needs again. You need an internet connection then.

How MacMan Scan handles this folder

Related folders

Get the free diagnosis

The scan is read-only. Diagnosis alone deletes nothing.