Reclaim disk space on a developer machine. Almost everything that fills a dev box is cache, build output, or old versions: removing it costs only re-downloads and slower first builds.
→ cheatsheet.md: clean commands and locations for every major language, toolchain, container runtime and OS.
I was honestly considering getting a new laptop due to constantly maxing out storage, and found the recommendations from the OS misleading as to what junk could be removed from the system.
Following this guide I was able to clear 100+ GB of junk, reclaiming ~25% of disk space and significantly expanding the useful life of the device.
It's crazy how much junk accumulates from day-to-day dev work across all your projects, languages, and toolchains, with so much of it being temporary caches.
This repo consolidates the tips and tricks I used to identify and remove junk from my system, a lot of which are so straightforward but I simply didn't know existed until now.
- Probe: run the read-only scripts below, or the tools in cheatsheet §0.
- Match: look up each finding in the cheatsheet.
- Clean: caches/artefacts first → uninstall apps → compact virtual disks last.
Read-only: they measure and report, and never delete anything. They run on Linux, WSL and macOS.
| Script | Reports |
|---|---|
scripts/hogs.sh [ROOT] [TOP] |
Largest dirs, files over MIN_FILE (default 500M), forgotten models/ISOs/archives |
scripts/artifacts.sh [ROOT] [DAYS] |
Build/dependency dirs per project with size, flagged stale if no source change in DAYS |
scripts/caches.sh |
~60 known tool caches with their clean command, installed runtimes, Docker, system package caches |
chmod +x scripts/*.sh
./scripts/hogs.sh ~
./scripts/artifacts.sh ~/dev 30 # needs bash 4.4+ (macOS: brew install bash)
./scripts/caches.shThe commands in the cheatsheet do delete things. Read each one before you
run it, measure first, and treat anything marked