npm Cache
npm stores downloaded package tarballs, registry metadata, integrity records, and extracted package data in its content-addressable cache so repeated installs can reuse files instead of fetching them again. Over time, that cache can accumulate outdated index entries, interrupted download remnants, and large numbers of old package blobs under ~/.npm/_cacache on macOS and Linux or npm-cache in current and legacy Windows locations. Kudu removes only the cached npm artifacts and metadata, forcing npm to repopulate them on the next install while leaving your projects, package.json files, lockfiles, accounts, and settings untouched.
Why clean npm Cache?
- Corrupted tarball blobs or incomplete downloads in _cacache trigger npm integrity or EINTEGRITY errors, and installs fail even though your package-lock.json has not changed
- Stale registry metadata keeps npm resolving an outdated version range, so npm install appears to ignore newly published packages until the cache is refreshed
- A content-addressable cache that has grown across many projects consumes multiple gigabytes, and users notice unexpectedly low disk space despite deleting old node_modules folders
- Interrupted installs can leave bad index entries behind, causing repeated cache miss and refetch cycles that make npm install look slower than a clean network download
- On Windows, old cache data in both %LocalAppData%/npm-cache and legacy %AppData%/npm-cache can make troubleshooting confusing when npm keeps reusing broken artifacts from a location you forgot existed
- Reused cached package data can preserve a previously bad or truncated archive, so the same package repeatedly fails to unpack with TAR or extraction errors until the cache entry is removed
Cache paths Kudu targets
Windows
%LocalAppData%/npm-cache |
%AppData%/npm-cache |
macOS
~/.npm/_cacache |
Linux
~/.npm/_cacache |
Common questions about npm Cache
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.