title: "How to Safely Delete Xcode DerivedData, Archives & iOS Simulators"
subtitle: "Recover 40GB to 100GB+ of SSD space without breaking your active iOS or macOS development workflows."
description: "Xcode silently hoards tens of gigabytes in DerivedData, obsolete iOS simulator runtimes, DeviceSupport symbols, and SwiftPM caches. Learn the exact terminal commands and safety rules to clean them."
datePublished: "2026-03-05"
dateModified: "2026-03-24"
author: "CleanSlate Systems Engineering"
readingTime: "8 min read"
category: "Developer"
targetBloat: "35GB – 120GB"
keywords:
- "delete xcode deriveddata safely"
- "xcrun simctl delete unavailable"
- "clear ios simulators disk space"
- "xcode devicesupport cleanup"
- "shrink xcode storage mac"
- "swift package manager cache mac"
faq:
- question: "Will deleting Xcode DerivedData delete my project source code?"
answer: "No. DerivedData only contains build products, intermediate object files (.o), module caches, and SourceKit symbol indices. Your actual Git repositories and Swift source code remain completely untouched. Xcode will simply rebuild whatever it needs on your next Cmd+B."
- question: "How do I safely remove old iOS simulator runtimes taking 30GB?"
answer: "Run 'xcrun simctl delete unavailable' in Terminal to remove cached simulator instances that no longer match installed iOS SDKs. For installed runtime disk images, navigate to Xcode Settings > Platforms to delete unused historical iOS versions."
- question: "What is iOS DeviceSupport and can I delete it?"
answer: "iOS DeviceSupport (~/Library/Developer/Xcode/iOS DeviceSupport) stores debugging symbols extracted from physical iPhones and iPads you previously connected. You can safely delete symbols for older iOS versions that you are no longer actively debugging."
- question: "Why does Xcode accumulate tens of gigabytes of disk space so quickly?"
answer: "Xcode prioritizes incremental build speed over disk storage. It saves compilation intermediates for every branch, configuration (Debug/Release), architecture (arm64/x86_64), and simulator target indefinitely without automatic cache eviction."
If you build iOS, macOS, watchOS, or visionOS apps with Xcode, you have likely watched your Apple Silicon Mac's SSD shrink by 50GB to 150GB in a matter of months.
Apple designed Xcode for maximum incremental build performance. As a result, the compiler, linker, and simulator daemons cache intermediate artifacts aggressively—and almost **never** evict them on their own.
In this developer guide, we cover the exact locations where Xcode stores dormant build artifacts, provide battle-tested Terminal commands to purge them, and explain how to maintain a fast build workflow without sacrificing half your SSD.
1. What Xcode Caches: The Big Four Bloat Vectors
Xcode splits its cached data across four primary directories in your user Library:
| Component | Path | Typical Size | Can You Safely Delete? |
|---|---|---|---|
| **DerivedData** | `~/Library/Developer/Xcode/DerivedData` | 20GB – 80GB | **Yes (100% safe)** |
| **iOS Simulator Runtimes** | `~/Library/Developer/CoreSimulator/Devices` | 15GB – 60GB | **Yes (via `xcrun simctl`)** |
| **iOS DeviceSupport** | `~/Library/Developer/Xcode/iOS DeviceSupport` | 10GB – 40GB | **Yes (Old OS versions)** |
| **Archives & SPM** | `~/Library/Developer/Xcode/Archives` & SPM caches | 15GB – 50GB | **Yes (After App Store release)** |
2. Safely Deleting Xcode DerivedData (20GB – 80GB)
What Is DerivedData?
DerivedData holds:
1. **`Build/Intermediates.noindex`:** Clang and Swift compiled object files (`.o`, `.dia`), modulemaps, and precompiled headers.
2. **`Index.noindex`:** SourceKit symbol indexes that power code completion, jump to definition, and syntax highlighting.
3. **`ModuleCache.noindex`:** Cached pre-built Swift modules from your dependencies.
How to Clean DerivedData
You can safely wipe the entire folder at any time. The only consequence is that your next build will be a full clean rebuild rather than an incremental compilation.
In Terminal, execute:
# Check size before cleaning
du -sh ~/Library/Developer/Xcode/DerivedData
# Safely remove all intermediate build artifacts
rm -rf ~/Library/Developer/Xcode/DerivedData/***Pro Tip:** If Xcode is currently open and indexing, quit Xcode (`Cmd+Q`) first before running the command to prevent file lock warnings in SourceKit-LSP.
3. Pruning Bloated iOS Simulators with `xcrun simctl`
When Apple updates Xcode, older simulator runtimes become deprecated or unavailable, but their disk images (which contain full iOS operating system root filesystems) remain on your SSD.
Step 1: Remove Unavailable Simulators
Run Apple's official simulator control utility to sweep away dead simulators:
xcrun simctl delete unavailableThis single command routinely frees **10GB to 30GB** by purging virtual device instances tied to older iOS SDK versions that are no longer supported by your current Xcode installation.
Step 2: Inspect Installed Simulators & Runtimes
To see what runtimes and device instances are currently registered:
xcrun simctl listTo view installed runtime bundles in JSON format:
xcrun simctl runtime list -jStep 3: Erase All Simulator Content and Settings
If your simulators are accumulating test app databases, CoreData stores, and Safari caches, you can reset all active simulator instances back to factory defaults:
xcrun simctl erase all4. Cleaning iOS DeviceSupport Symbols (10GB – 40GB)
Whenever you attach a physical iPhone or iPad to your Mac with a different iOS build number, Xcode extracts symbol files from the device so it can symbolicate crash logs.
Over time, this folder preserves symbols for every iOS beta and point release you have ever plugged in:
du -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport/* 2>/dev/nullSafe Cleanup:
If you are no longer debugging physical devices running iOS 15, iOS 16, or older iOS 17 sub-versions, you can safely delete those version folders:
# Remove symbols for iOS versions you no longer test
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/16.*5. Cleaning Swift Package Manager & CocoaPods Caches
SwiftPM and CocoaPods download Git repositories and precompiled XCFrameworks into shared cache directories:
# Swift Package Manager Shared Cache
rm -rf ~/Library/Caches/org.swift.swiftpm
# CocoaPods Download Cache
pod cache clean --all 2>/dev/null || rm -rf ~/Library/Caches/CocoaPods6. Automate Xcode Bloat Management with CleanSlate
Remembering four different paths, passing `xcrun simctl` commands, and calculating directory sizes in Terminal is tedious.
**CleanSlate** includes a dedicated **Developer Module**:
Try the free scanner or get the lifetime Pro license for $14.99 one-time.