DiskInsight / Guides
How to free up disk space on a Mac
The practical, developer-tested guide to getting gigabytes back — without ever trusting your files to the cloud.
Your Mac's "Storage" tab shows three optimistic colors and nothing to click. The System Data bucket swallows everything else. This guide covers the exact things that actually eat space on a developer machine, where they live, and how to reclaim them safely.
1. Clear Xcode DerivedData first
On most dev machines this is the single biggest win. DerivedData grows with every build — debug symbols, module caches, link files — and old projects are never cleaned up automatically.
~/Library/Developer/Xcode/DerivedData
You can rm -rf everything inside it; Xcode just builds slower the
next time. A scanner is the honest way to see the top offenders before you delete.
2. Prune package manager caches
- npm:
npm cache clean --force, or delete~/.npm/_cacache - Homebrew:
brew cleanup --prune=allremoves old formulae and cached downloads - CocoaPods:
pod cache clean --alland~/.cocoapods - Rust:
~/.cargoregistry caches - Go:
go clean -cache, or trim~/Library/Caches/go-build
Note: Homebrew and Docker are not cleaned by DiskInsight's Dev Cache Cleaner — those stay manual, which is why they're listed here.
3. Reclaim Docker's reserved space
Docker's disk usage doesn't go down when you delete containers. Prune in layers:
docker system prune -a, then docker builder prune -a.
On Apple Silicon the backing file can stay large until you use
Settings → Resources → Disk image size to shrink it.
4. Find duplicates and orphans
Big downloads often exist in Downloads and Documents. Old apps leave
Application Support, Containers and Caches
behind after you drag them to the Trash. A content-addressable duplicate finder and
an app uninstaller that knows these paths catches both — locally, never uploading a path.
5. Let a disk analyzer show you the real map
The fastest way to free space is to see the space. DiskInsight scans a folder, your home directory, or the whole Mac and renders an interactive treemap, an age map, top sizes and more — then lets you stage anything to the Trash for review before anything happens.
Frequently asked
Why do developers run out of disk space so fast?
Long-lived dev machines accumulate gigabytes almost invisibly: Xcode DerivedData, iOS simulators, npm/pnpm/Yarn caches, Docker images and build layers, CocoaPods, Gradle, go-build and Homebrew duplicates. None of them show up as a single obvious folder.
Where is Xcode DerivedData and why is it so big?
DerivedData lives in ~/Library/Developer/Xcode/DerivedData. Xcode rebuilds it constantly, and stale objects from old projects can easily exceed 20–50 GB. It's safe to clear whenever you can afford a slightly slower next build.
What about Docker disk usage?
Docker accumulates stopped containers, dangling images and build cache layers. On a Mac much of it lives in a sparse Docker.raw bundle, so the space stays reserved even after you delete containers — you need to prune the build cache and images.
Is it safe to delete caches?
Almost always, yes. Caches are regenerated on demand. DiskInsight only ever moves things to the macOS Trash (never permanent deletion in the background), so you can review exactly what will be removed first.
Keep going
Clean Xcode DerivedData
Where it lives, why it balloons, and the safe, reversible fix.
Find duplicate files
Terminal tricks and a content-hash duplicate finder that previews first.
What is System Data?
The gauge that grows and never explains itself — decoded.
See exactly where your space went
One-time license. Local scanning. No account, no cloud, no catch.