Where a dev disk actually goes
The four big hoarders rarely surprise anyone who has looked once: package caches grow with no ceiling because that is the default, node_modules duplicates the dependency tree in every project, Docker keeps every layer it ever pulled or built, and WSL2 stores its entire Linux filesystem in a virtual disk that grows on demand and never shrinks on its own. Add IDE indexes, build artifacts and three SDK versions side by side, and a two-year-old machine casually carries tens of gigabytes of provably dead weight. None of it is mysterious — the junk is simply spread across a dozen directories you never visit.
- npm: %LOCALAPPDATA%\npm-cache — full copies of every version of every package you ever installed
- pip: %LOCALAPPDATA%\pip\cache — wheels for everything, plus ~/.cache/pip inside every WSL distro
- Docker Desktop: dangling images, stopped containers, build cache and anonymous volumes — docker system df shows the total, docker system prune reclaims it
- WSL2: the ext4.vhdx distro file grows with every build and never gives the space back without a forced compact
- Projects: an abandoned repo's node_modules runs from hundreds of MB to several GB — the value is in the lockfile, the folder is rebuildable
- IDEs: JetBrains cache and index directories, plus the target/, build/, dist/, obj/ folders scattered across every checkout
The quarterly pass, in the right order
Measure first, so the hour goes where the mass is: a treemap tool over the user profile, docker system df for the container side, wsl --list --verbose for the distros. Then work safe-to-risky: caches are rebuilt on demand, so purge them freely — npm cache clean --force, pip cache purge, and the equivalents in Gradle and cargo; abandoned projects come next — delete the dependency folders, keep the lockfiles, and when the repo wakes up, npm ci or pip install -r rebuilds everything in minutes. Docker comes after: prune the dangling images and the build cache, keep the tagged images you actually run. Last is the WSL2 virtual disk, because deletions inside the distro do not shrink the file on the Windows side: run wsl --shutdown, then compact the vhdx — or export and re-import the distro if it has grown truly monstrous.
Habits that keep the disk flat
Hygiene as a habit is cheaper than hygiene as a rescue. Keep tooling per-project instead of global installs, let CI pull fresh images instead of hoarding them locally, and run docker system prune monthly before the layer zoo grows a memory. Put multi-gigabyte datasets on a second drive and link them in, so the system disk only holds what regenerates. And treat a nearly full C: as a build-time incident rather than a cosmetic issue — npm, Docker and the compiler toolchain all start failing in creative ways when the disk they scratch on runs out.
Questions and Answers
Is it safe to delete npm and pip caches?
Yes — caches exist to be rebuilt. npm cache clean --force and pip cache purge free the space, and the next install simply re-downloads what it needs.
How do I shrink the WSL2 virtual disk?
Delete the junk inside the distro first, then run wsl --shutdown and compact the vhdx with DiskPart or Optimize-VHD. For a truly bloated distro: export and re-import — the fresh file only holds live data.
Know what is included before you buy.
The one-time 30-minute trial covers core tools. PRO-labelled features stay locked until a paid license is activated.
Read next
Write to us: [email protected]