CleanSlateFOR MAC
macOS SystemReclaim 50GB+SIP Protected

how-to-safely-delete-xcode-deriveddata-ios-simulators

CleanSlate Engineering Team
Updated 2026-03-15
7 min read
Visual Cleanup Shortcut

Don't want to risk running shell commands on your SSD?

CleanSlate maps these exact paths in a 60fps Squarified Treemap and cleans them safely in one click.


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:

ComponentPathTypical SizeCan 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 caches15GB – 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:

bash
# 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:

bash
xcrun simctl delete unavailable

This 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:

bash
xcrun simctl list

To view installed runtime bundles in JSON format:

bash
xcrun simctl runtime list -j

Step 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:

bash
xcrun simctl erase all

4. 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:

bash
du -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport/* 2>/dev/null

Safe 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:

bash
# 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:

bash
# 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/CocoaPods

6. 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**:

  • **Automatic Version Detection:** Scans `DerivedData`, `iOS DeviceSupport`, and `CoreSimulator` in under 0.8 seconds.
  • **Selective Project Cleaning:** Shows you exactly which project's build artifacts are largest in a visual Squarified Treemap.
  • **One-Click Simulator Sweep:** Integrates directly with Apple's `simctl` API to delete unavailable device files without terminal interaction.
  • Try the free scanner or get the lifetime Pro license for $14.99 one-time.

    Audit Your Mac Drive in 2.4 Seconds

    Experience the 60fps Squarified Treemap. See every byte of Xcode DerivedData, Docker.raw, and Adobe caches with zero risk.

    Region:
    Free Scanner (.dmg)
    One-time purchase (No subscriptions)3 Macs per license100% Offline Ed25519 Token
    Merchant of Record: Dodo Payments. Local EU/UK VAT & AU GST automatically calculated and included.