Apps

npm Cache

npm keeps a local content-addressable cache of downloaded package tarballs, packuments, manifest metadata, and integrity-verified blobs so installs can be reused without fetching everything from the registry again. Over time, the _cacache store can accumulate outdated metadata entries, partial downloads, and old package archives from repeated installs, version changes, and interrupted network activity. Kudu removes this npm cache data to free disk space and clear stale or corrupted cached artifacts without touching your projects, lockfiles, global packages, accounts, or saved npm settings.

Why clean npm Cache?

  • Corrupted cached tarballs or partial content blobs make npm install fail with EINTEGRITY, Z_DATA_ERROR, or unexpected end of file messages when packages are unpacked
  • Stale cached packument metadata can make npm resolve an older version than expected, so you keep seeing the wrong dependency tree even after a package was updated in the registry
  • A cache filled with years of package tarballs and metadata can grow to multiple gigabytes, showing up as missing disk space even though your active projects are much smaller
  • Interrupted downloads can leave bad cache entries behind, causing repeated fetch retries, long install times, and installs that appear stuck on the same package
  • After switching registries, scopes, or authentication setups, npm may keep reusing cached metadata from the previous source, which shows up as confusing 404 errors or mismatched package versions
  • Large, fragmented cache storage means npm spends more time scanning and validating cached content, which users notice as slower dependency installs before any network download even starts
  • Clearing the cache forces npm to fetch fresh package metadata and tarballs, which often fixes recurring install errors while leaving package.json, package-lock.json, node_modules choices, and login state untouched
What gets cleaned

Cache paths Kudu targets

Windows

%AppData%/npm-cache

macOS

~/.npm/_cacache

Linux

~/.npm/_cacache
Frequently asked

Common questions about npm Cache

Free & open source

Download Kudu and reclaim your disk space.

Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.