How to Free Up Disk Space on Mac: The Developer's Complete Guide
The Silo Team · 10 min read · Updated September 27, 2026
Why Your Mac's Disk Fills Up Faster Than You Think
As a macOS developer, your disk fills up in ways that generic cleanup guides don't address. Xcode DerivedData alone can consume 15–50 GB. Docker.raw virtual disks silently balloon to 60 GB. And macOS itself quietly holds 20–80 GB in hidden Time Machine APFS snapshots that Finder doesn't show you.
This guide cuts through the noise. We'll cover the exact folders, exact commands, and the right order to safely reclaim space — without breaking anything.
1. The Biggest Wins First: Developer-Specific Bloat
Xcode DerivedData (~15–50 GB)
DerivedData is Xcode's build cache. It rebuilds automatically when needed. It is 100% safe to delete.
rm -rf ~/Library/Developer/Xcode/DerivedData
Or use MacPilot's one-click Xcode Reclaimer which also handles iOS Simulator runtimes and DeviceSupport symbol caches.
Docker.raw Virtual Disk (~20–60 GB)
Docker Desktop on macOS uses a sparse virtual disk file at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw. This file grows but never auto-shrinks. Prune dangling resources first:
docker system prune --volumes -f
docker builder prune --all -f
MacPilot's Docker Companion shows the exact allocated vs. used size and warns you before the disk hits 80%.
node_modules Graveyards (~5–40 GB)
Old projects leave behind node_modules directories that are never used again. Find them all:
find ~ -name "node_modules" -type d -prune 2>/dev/null | sort
Orphaned iOS Simulators (~10–30 GB)
Old Xcode simulator runtimes accumulate. Remove the ones no longer needed:
xcrun simctl delete unavailable
2. APFS-Specific: The Hidden Gigabytes
Time Machine Local Snapshots (20–80 GB)
macOS creates silent APFS snapshots before major updates. These show as "purgeable" space but Finder won't reclaim them proactively. Check what you have:
tmutil listlocalsnapshots /
MacPilot surfaces these snapshots with their exact creation timestamps and sizes, letting you prune selectively.
APFS Purgeable Space vs. Free Space
macOS reports "purgeable" space separately from "free" space. Purgeable includes iCloud stubs, Time Machine snapshots, and cached files. MacPilot's Visual Storage Allocation Bar shows this accurately without triggering cloud downloads.
3. Safe Cleaning Order
- DerivedData — Always safe, always first.
- Docker pruning — Dangling images and build caches.
- iOS Simulators — xcrun simctl delete unavailable.
- APFS Snapshots — Via tmutil or MacPilot.
- node_modules in old projects — Review manually.
- System caches in ~/Library/Caches — Safe for most app folders.
- App leftovers — Use MacPilot's Symlink-Safe Remnant Hunter.
Using MacPilot's Quick Reclaim
MacPilot's Dashboard includes a 1-click Quick Reclaim that safely runs the top-5 highest-impact reclamations in the correct order, showing you exactly how much was freed. It takes under 60 seconds and never touches your source code, Git repos, or personal documents.
Keep reading
How to Kill a Process on a Port on Mac (localhost:3000, 5432, 8080)
The right way to find and kill whatever is listening on localhost:3000, 8080, or 5432 on macOS — using lsof, process tree resolution, and MacPilot.
Why Deleting ~/Library/Caches Slows Down Your Mac: The Stale-Aware Cache Guide
Standard Mac cleaners blindly purge ~/Library/Caches, triggering the infamous 'post-cleanup stutter' where apps redownload hundreds of MBs of avatars and shader caches. Here is how Stale-Aware Cache Eviction keeps your Mac fast while freeing tens of gigabytes.