---
title: "npm cache · MacMelon"
description: "The npm cache stores package tarballs so later installs can reuse them. It is separate from node_modules. Smart Clean can include it."
url: "https://macmelon.com/glossary/npm-cache"
---

# npm cache

npm's on-disk store of package tarballs, reused by later installs.

npm keeps a cache of package contents so the next install can avoid downloading the same tarball. The default location is under the user Library or wherever npm config get cache points. The cache is shared across projects. node\_modules is not: that folder belongs to one project.

Clearing the cache is reversible only in the sense that npm can download again, and in the sense that [Disk Housekeeper](https://macmelon.com/apps/disk-housekeeper) sends removals to the Trash by default after a preview. If you expect to work offline, leave the cache in place. The distinction is spelled out in [Delete node\_modules safely](https://macmelon.com/use-cases/delete-node-modules-safely).

## Apps

[Make room for what matters. Clear clutter with confidence. ### Disk Housekeeper](https://macmelon.com/apps/disk-housekeeper)

## Related guides

[### How to clean developer files on macOS](https://macmelon.com/guides/how-to-clean-developer-files-on-macos)

## Related use cases

[### Clean npm, Gradle, and Cargo caches](https://macmelon.com/use-cases/clean-developer-caches)[### Delete node\_modules safely](https://macmelon.com/use-cases/delete-node-modules-safely)

## Related terms

[The folder where a JavaScript project keeps its installed dependencies. ### node\_modules](https://macmelon.com/glossary/node-modules)[Files a developer tool keeps so the next build or install can skip a download or a compile. ### Developer cache](https://macmelon.com/glossary/developer-cache)[Gradle's user-level store of dependencies and build outputs. ### Gradle cache](https://macmelon.com/glossary/gradle-cache)
