← All posts

Xcode is eating your disk: a cleanup guide for developers

DerivedData, simulators, device support files, Docker images, and node_modules can take 100 GB on a developer Mac. Here is what each one is and what is safe to delete.

August 20, 2026 · 7 min read

Developer Macs fill up faster than any other kind. The reason is not source code, which is tiny. It is the build products, simulator images, container files, and dependency folders that tools create on your behalf and never clean up. Here is the list, in the order we usually see it in scans.

Xcode

Xcode alone can account for half of a full drive.

DerivedData

~/Library/Developer/Xcode/DerivedData holds intermediate build files, indexes, and logs for every project you have opened. It grows every time you build and is never trimmed. Ten to thirty gigabytes is normal.

Safe to delete at any time. Xcode rebuilds it on the next build, which will be slower once.

iOS DeviceSupport

~/Library/Developer/Xcode/iOS DeviceSupport holds debugging symbols for each iOS version of each physical device you have connected. Each folder is 2 to 5 GB. Once a device updates to a newer iOS, the older folder is never used again.

Safe to delete folders for iOS versions you no longer debug on. The same applies to watchOS DeviceSupport and tvOS DeviceSupport.

Simulators

~/Library/Developer/CoreSimulator/Devices stores a disk image per simulator. Every iOS runtime you have installed adds a set of simulators, and each one holds the apps you have run on it.

Remove old runtimes from Xcode → Settings → Components rather than deleting the folders. To reset the ones you keep, run xcrun simctl delete unavailable in Terminal.

Archives

~/Library/Developer/Xcode/Archives keeps every build you have archived for the App Store or TestFlight, with debugging symbols. You need the archive for versions still in review or in the field. Older ones can go.

Docker

Docker Desktop keeps images, containers, and volumes in one virtual disk file under ~/Library/Containers/com.docker.docker. The file grows and does not shrink on its own. Run docker system prune -a to remove unused images and containers, then check Docker Desktop's settings for the disk image size limit.

node_modules

A single JavaScript project often has a node_modules folder between 200 MB and 1 GB. Old projects you no longer touch still have theirs. A scan of ~/Developer or wherever you keep projects will show them as a row of similar-sized folders. Delete them for projects you are done with. Running npm install brings them back if you need them.

Package caches

Package managers keep a cache of everything they have ever downloaded.

  • Homebrew: brew cleanup removes old versions and the download cache.
  • npm: npm cache clean --force.
  • Yarn: yarn cache clean.
  • pnpm: pnpm store prune.
  • CocoaPods: ~/Library/Caches/CocoaPods.
  • Swift Package Manager: ~/Library/Caches/org.swift.swiftpm.
  • Gradle: ~/.gradle/caches.
  • pip: pip cache purge.

Virtual machines

Parallels, VMware Fusion, and UTM store each virtual machine as a single file of 20 to 100 GB in ~/Parallels, ~/Virtual Machines, or ~/Library/Containers/com.utmapp.UTM. Snapshots inside a VM add to that. Delete the machines you no longer boot.

Finding all of it at once

You do not need to check each folder by hand. Scan your home folder in DiskDude and open the Flame view. Developer folders show up as tall towers because they nest deeply, and ~/Library/Developer is usually the widest bar on the second row. The Age map view marks which build folders you have not touched in months, which is a good sign they belong to finished projects.

Add the folders you are sure about to Cleanup, review the list, and remove them. A typical first pass recovers 30 to 60 GB on a Mac that has been used for iOS development for a couple of years.

Keep reading

September 15, 2026 · 5 min read

How to find and delete duplicate files on a Mac

Duplicates hide in Downloads, photo exports, and old project folders. Here is how to find them safely and which copy to keep.

Read more →
September 10, 2026 · 5 min read

Why macOS says your disk is full when it is not

System Data, purgeable space, and local snapshots explain most of the gap between what Finder reports and what you can actually see. Here is how to read the storage panel.

Read more →