Free up disk space on a Mac: the developer's checklist

Where developer disk space goes on macOS (Xcode DerivedData, simulators, Docker, Homebrew, package caches, build folders) and how to safely reclaim each.

Nov 1, 20262 min read

Sight gauge: what each category holdsTanks, left to right: DerivedData, simulators, Docker, Homebrew, project foldersAn example developer Mac. Each tank drains to what its usual cleanup leaves: DerivedData to nothing, simulators to the runtimes you use, Docker to images you keep, Homebrew to current versions, and project folders to the ones you are working on.

“Your disk is almost full.” On a developer’s Mac, the culprit is rarely photos. It’s a dozen caches and build folders that each made sense at the time. This checklist goes from biggest-and-safest to most situational. Measure first, then delete.

1. Project build folders

Every project you’ve ever cloned keeps its dependencies and build output: node_modules, Rust target, Flutter build and .dart_tool, Swift .build, Python tool caches, Gradle and Maven output. Across a few years of side projects, this is often the single largest category.

  • Command line: delete all node_modules folders, plus cargo clean and flutter clean per project.
  • One pass: Gigaflush scans a folder for all of these at once, shows sizes, and removes the ones you choose. It lives in the menu bar for exactly this moment.

2. Xcode

Xcode is the usual heavyweight if you build for Apple platforms.

du -sh ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Developer/Xcode/DerivedData/*

Build intermediates and indexes. Quit Xcode first. Projects rebuild and re-index on next open.

Simulator runtimes themselves can be removed in Xcode → Settings → Components (or Platforms, depending on your Xcode version).

3. Docker

Docker Desktop keeps images, containers, volumes and build cache inside one virtual disk that rarely shrinks on its own.

docker system df

4. Package manager caches

These are global caches, separate from your projects’ node_modules. Clearing them is safe but means re-downloading later.

brew cleanup --prune=all

5. Everything else worth a look

  • Old Node versions in your version manager (~/.nvm/versions, ~/.volta, ~/.fnm), and old Rust toolchains (rustup toolchain list).
  • Android SDK images in ~/Library/Android/sdk/system-images if you’ve tried many emulator versions.
  • iOS device backups under ~/Library/Application Support/MobileSync/Backup, which are huge. Manage them from Finder.
  • Downloads. Yes, really. Old .dmg installers add up.

A routine that keeps it away

Once a month: clean project build folders for anything you haven’t touched, run xcrun simctl delete unavailable, brew cleanup and docker system prune. That’s ten minutes, and it usually keeps “System Data” from creeping back.

Keep reading