npm cache clean Explained

What npm cache clean does, with an example.

Published November 11, 2026

npm cache clean clears npm's local package cache, occasionally used to resolve corrupted-cache install issues.

Key points

  • Part of the standard npm CLI that ships with Node.js

Example

npm cache clean --force
More JavaScript articles