# Windows Developer Caches: What npm, pip and Gradle Store

A project has barely grown, yet the C drive has gained several GB. Finding an npm, pip or Gradle directory is not a reason to delete it whole. Download caches, project dependencies, build output and saved tool versions serve different jobs, and rebuilding depends on their sources remaining available.

## Find the location the tool actually uses

In a terminal with the relevant tools installed, these commands show npm's cache location and pip cache information without deleting content:

```powershell
npm config get cache
python -m pip cache info
```

The pip query uses the environment selected by `python`. If you changed cache locations, follow the output. The [npm configuration reference](https://docs.npmjs.com/cli/v11/commands/npm-config/) and [pip cache reference](https://pip.pypa.io/en/stable/cli/pip_cache/) describe the queries. One PC's default path is not every project's configuration.

## Distinguish four kinds of directories

| Type | Examples | Check before removal |
| --- | --- | --- |
| Package-download caches | npm cache, pip HTTP and wheel caches | Whether later installation needs downloads, especially offline |
| Project dependencies | `node_modules`, virtual environments, `vendor` | Whether packages, lockfiles, sources and installation steps remain available |
| Build output | `dist`, `build`, `obj` | Whether it is generated content and contains anything added manually |
| Tool versions and local repositories | Downloaded Gradle versions and some locally installed packages | Whether the next sync or build directly needs them |

Rebuilding has a cost. Network access, available sources, authentication and offline requirements matter. A dependency directory is not a universal cleanup target merely because its name is familiar.

## A cache problem is different from a dependency problem

npm's download cache validates content, and its [documentation](https://docs.npmjs.com/cli/v11/commands/npm-cache/) describes refetching corrupted data. An install error is not sufficient reason to empty the cache. A network failure, unavailable locked version or dependency conflict can remain unchanged afterward.

pip separates cached HTTP responses from cached wheels, including previously built installable packages. Its [caching documentation](https://pip.pypa.io/en/stable/topics/caching/) explains both. `pip cache list` lists wheels rather than every file in the cache directory. Virtual environments isolate installed dependencies, but multiple environments can share a pip cache. Selecting a different `python` does not guarantee a separate cache location; read the query's output.

## A lockfile records versions, not a backup of packages

Consider an offline project with its `package-lock.json` intact but both `node_modules` and download caches removed. The version record remains, but the packages needed to install may be unavailable. A lockfile controls version selection; it does not preserve package files or access to a private registry.

Gradle's [dependency cache documentation](https://docs.gradle.org/current/userguide/dependency_caching.html) explains why offline builds require the necessary artifacts locally. Its [directory and retention guide](https://docs.gradle.org/current/userguide/directory_layout.html) separates version-specific caches, shared dependencies and Wrapper distributions. Before clearing a large `.gradle` directory, identify which category grew. Old entries managed by the tool and dependencies an active project still needs deserve different decisions.

<figure class="blog-diagram">
  <picture>
    <source media="(max-width: 900px)" srcset="/img/blog/windows-windows-developer-caches-en-mobile.webp" type="image/webp" width="768" height="1500">
    <img src="/img/blog/windows-windows-developer-caches-en.webp" width="1360" height="454" loading="lazy" alt="Development storage has different roles">
  </picture>
  <figcaption>The four directory roles have different rebuilding costs. A lockfile records versions rather than preserving packages or toolchains.</figcaption>
</figure>

## What Mole handles and what stays with the tool

Mole for Windows lists recognized npm, pip and other caches. Content in use remains protected, and items with data that does not regenerate automatically wait for review. It does not treat every project's dependency folder as generic cache. Selecting a cleanup item does not authorize quitting every Node.js or Python process on the PC.

Gradle's `caches` and `wrapper\dists` stay outside Mole's cleanup scope. Android Studio synchronization and the next build may need them directly. Let Gradle manage retention rather than clearing a version only to download it again.

Manage project output according to that project's instructions. The table explains directory roles; it does not mean Mole scans and automatically deletes every listed project path. Source, configuration, sessions and local models do not become caches merely by residing in development folders.

## Verify with the same project afterward

Keep an independent copy of anything you need, then handle selected caches. Repeat the project's original install or build and note any downloads required. Do not clear dependencies, tool versions and download caches together just before an offline presentation or trip.

If virtual disks, models or large outputs occupy most storage, use the [large-file guide](/windows/blog/find-large-files-on-windows). The [cache guide](/windows/blog/windows-cache-cleanup) separates ordinary caches from personal data.


Canonical: https://mole.fit/windows/blog/windows-developer-caches
