Xcode Taking Too Much Space on Mac: Safe Commands to Reclaim 50+ GB

Developer Tools • By macOS Systems Engineer • 9 min read
Direct Answer (AEO Summary)

Xcode consumes excessive Mac storage due to accumulated build caches in DerivedData, obsolete iOS simulator runtimes, old device support symbols, and archive files. You can safely reclaim 30-70 GB by emptying ~/Library/Developer/Xcode/DerivedData, running "xcrun simctl delete unavailable", and deleting obsolete iOS platform runtimes in Xcode Settings > Platforms.

For iOS, macOS, and Swift developers, Xcode is notorious for silently consuming up to 100 GB of storage. A base Xcode install is only ~14 GB, but within months of builds, testing, and simulator updates, it expands dramatically.

1. The Four Major Xcode Storage Culprits

  • DerivedData (10–50 GB): Intermediate compilation objects, module caches, and index stores. Safe to delete anytime.
  • iOS Simulators & Runtimes (15–40 GB): Virtual disk images for each iOS/watchOS/tvOS SDK iteration.
  • iOS Device Support (10–30 GB): Debug symbols extracted whenever you plug in a physical iPhone or iPad running a specific iOS build.
  • Archives (5–30 GB): Past release builds generated when clicking "Product → Archive".

2. Safe Terminal Cleanup Commands

Run these verified commands in Terminal:

# Clean DerivedData safely rm -rf ~/Library/Developer/Xcode/DerivedData/* # Delete unavailable / ghost simulator devices xcrun simctl delete unavailable # Prune Xcode module caches rm -rf ~/Library/Caches/com.apple.dt.Xcode

3. How Nebula Shields Active Repositories

Generic cleaner apps often break active Xcode workspaces by indiscriminately wiping local Swift Package Manager caches (.build) or deleting git index files mid-session. Nebula uses an Active Project Guard rule: it checks .git timestamps and never touches directories with active development commits within the last 7 days.

Automate Safe Offloading with Nebula

Nebula identifies files you haven't opened in months, streams them safely with SHA-256 validation to your external SSD, NAS, or Cloud, and lets you restore in one click.

Join the Mac Waitlist — Founding Offer ($9.99)

Related Mac Storage Guides