Developer disk hogs: Gradle, npm, node_modules and the caches that never go away

By the Zofle team · 6 November 2026 · 4 min read

Most developers have lost 20 or 50 GB without noticing. Build tools are built to be fast, so they keep everything they ever downloaded or compiled. Nothing expires, and nothing is cleaned when you finish a project. The files are not hidden on purpose: they sit in dot-folders in your home folder and inside every old project.

The usual places

ToolWhere the cache livesSafe to delete?Find it / clean it
Gradle~/.gradle/caches, ~/.gradle/wrapper/dists (Windows: %USERPROFILE%\.gradle)Yes. Downloaded again on the next build, slowly.gradle --stop first, then delete the folders. Old wrapper versions pile up in wrapper/dists.
npm~/.npm (Windows: %LocalAppData%\npm-cache)Yesnpm config get cache, npm cache clean --force
pnpmone content store, often ~/.local/share/pnpm/store or ~/Library/pnpm/storeYes, but projects are hard-linked to itpnpm store path, pnpm store prune
Yarnyarn cache dir shows itYesyarn cache clean
node_modulesinside every project, often 200 MB to 1 GB eachYes. npm install brings it back.Delete it in projects you are not working on
Maven~/.m2/repositoryYes, but a slow first build offlineDelete the folder, or only old versions
Cargo (Rust)~/.cargo/registry and a target/ folder in each projectYescargo clean in a project removes target/
pip / Pythonpip cache dir; each project's .venvCache yes; a venv can be rebuilt from requirementspip cache purge
Go~/go/pkg/modYesgo clean -modcache
Xcode (Mac)~/Library/Developer/Xcode/DerivedData, iOS DeviceSupport, Archives, CoreSimulatorDerivedData yes. Keep Archives you may need to symbolicate.xcrun simctl delete unavailable removes simulators you can no longer run
Android~/.android/avd (emulators), the SDK's old system-images and build-toolsUnused emulators and old images yesAndroid Studio's SDK Manager and Device Manager
Flutter / Dart~/.pub-cacheYesdart pub cache clean

Why you have several of them

Node is the worst case. You can end up with an npm cache, a pnpm store, a Yarn cache, a Bun cache and a copy of node_modules in every project, each holding the same packages. Version managers like nvm, fnm and Volta each keep every Node version you ever installed too (~/.nvm/versions, for example). Delete the Node versions you no longer use first; they are often 100 MB or more each.

How to find the big folders

On a Mac or Linux, run du -sh ~/.* 2>/dev/null | sort -h | tail to see the biggest dot-folders in your home folder. To find old project folders: find ~ -name node_modules -type d -prune. On Windows, open Settings, System, Storage, or use a tool that lists folder sizes. Look at %USERPROFILE% and %LocalAppData% first.

Before you delete

  • Stop the daemons: Gradle and Kotlin keep background processes alive after a build (gradle --stop).
  • Never delete a cache while a build or an IDE sync is running.
  • Anything you cannot download again (private packages from a registry you no longer have access to, signed archives) is not a cache. Check first.
  • Expect the next build to be slow, because it downloads everything again. Do the cleanup when you are not on a deadline.

Where Zofle fits. Zofle is a free disk cleanup and file finder for Mac and Windows. It shows what is filling a disk, folder by folder, lists developer caches, old build folders and leftovers with their size and date, lets you untick what you want to keep, and sends the rest to the Trash or Recycle Bin first so you can undo it.

Sources and method

  • Gradle documentation: build cache and Gradle User Home (docs.gradle.org).
  • npm documentation: npm cache; pnpm documentation: pnpm store.
  • Apple developer documentation: managing Xcode's derived data and simulators (xcrun simctl help).
  • Paths and commands are from each tool's own documentation and can differ by version; run the 'find it' command on your own machine before deleting anything.

Zofle Pro news

People signing up now will get Zofle Pro, with more features, for free when we launch it.

One email when it's ready. No spam, ever.