Features Download Screenshots Blog Pricing

← Blog

Disk Cleanup for Developers: Reclaim Gigabytes from Docker, node_modules and Build Caches

Developer machines fill up in a way home PCs never do. You don't have 40 GB of old games and duplicate holiday photos β€” you have 200 node_modules folders, a Docker daemon that has been hoarding images since 2024, and build caches that never clean themselves. The worst part? Most of it is invisible until your CI cache or your editor starts complaining about disk space.

Here's how to see it all, clean it safely, and keep it from coming straight back.

Start with a full picture

Before you run any cleanup commands, scan your drive so you know what you're actually dealing with. Open DiskRaptor, scan your home or project folder, and sort by size. You'll usually see the same handful of culprits appear at the top β€” and knowing the real numbers makes it easy to decide what's safe to delete.

DiskRaptor scan showing large developer directories
Scan your projects folder sorted by size β€” caches and dependencies float to the top.

1. node_modules β€” the classic space leak

Every JavaScript project ships its own copy of its dependencies, and a single node_modules is routinely 200 MB to 1 GB. Multiply that by every repo you've ever cloned β€” including ones you haven't touched in months β€” and it's often the single biggest item on a JS/TS developer's disk.

2. Docker β€” the silent giant

Docker is the most common "wait, that's where my disk went" answer. Every image pull, every build layer, every stopped container and every named volume lingers until you explicitly prune it.

First, see how much it's using:

docker system df

Then reclaim it. From safe to aggressive:

On macOS and Windows, the Docker Desktop VM's disk file can also grow even after pruning β€” use the Troubleshoot β†’ Clean / Purge data option to shrink it back.

3. Package & build caches

Every package manager keeps a global cache so installs are fast β€” but they grow without bound. Here are the quick wins by ecosystem:

4. Build output directories

These are almost always safe to delete β€” they're regenerated by the next build β€” and they're often bigger than the source itself:

Scan your projects root in DiskRaptor and sort by size β€” any of these that belong to projects you're not actively building right now can be deleted wholesale.

5. IDE & editor caches

Editors keep indexes and caches that grow with your codebase:

6. Virtual machines & emulators

The heavyweight category, so check it before you go hunting for small fry:

7. Git repositories

A repository's .git folder can balloon from large binaries, old packfiles and forgotten branches:

DiskRaptor treemap showing developer caches and dependencies
The treemap makes the big offenders obvious at a glance β€” Docker, caches and build output.

The golden rules

Everything above falls into three buckets, and keeping them straight is what keeps a cleanup safe:

One final habit that saves more than any command: schedule a quarterly scan. Open DiskRaptor, sort by size, and clear anything from the first two buckets. Fifteen minutes every three months keeps a 256 GB dev machine from ever hitting the wall again.

Related reading

See exactly what's eating your disk

DiskRaptor is free, open source, and runs 100% locally β€” no telemetry, no tracking.