If you've been doing iOS development for more than a year, there's a good chance Xcode-related files are consuming 50-100GB of your Mac's SSD -- and most of it is from simulators and device support files you don't even use anymore.
Unlike DerivedData (covered in our Xcode Cleanup Guide | Flutter/Dart Cleanup | Terraform/OpenTofu Cleanup), simulator and device support files persist across project cleanups and Xcode updates. They silently accumulate with every iOS version and every device you've ever connected.
The Full Xcode Disk Space Audit
Run this to see exactly what Xcode is costing you:
# === SIMULATORS ===
du -sh ~/Library/Developer/CoreSimulator/Devices/ 2>/dev/null
du -sh ~/Library/Developer/CoreSimulator/Caches/ 2>/dev/null
du -sh ~/Library/Developer/CoreSimulator/Profiles/ 2>/dev/null
# === DEVICE SUPPORT ===
du -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/watchOS\ DeviceSupport/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/tvOS\ DeviceSupport/ 2>/dev/null
# === BUILD ARTIFACTS ===
du -sh ~/Library/Developer/Xcode/DerivedData/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/Archives/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/Products/ 2>/dev/null
# === DOCUMENTATION & CACHES ===
du -sh ~/Library/Caches/com.apple.dt.Xcode/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/DocumentationCache/ 2>/dev/null
# === TOTAL ===
echo "=== Complete Xcode Disk Usage ==="
du -shc ~/Library/Developer/CoreSimulator ~/Library/Developer/Xcode ~/Library/Caches/com.apple.dt.Xcode 2>/dev/null | tail -1
1. Cleaning iOS Simulators (Biggest Space Saver)
Each iOS simulator runtime is a full iOS image. Having simulators for iOS 15, 16, 17, and 18 means 4 complete iOS system images cached on your Mac. Each runtime is 5-8GB.
List All Simulator Runtimes
# List all installed runtimes
xcrun simctl runtime list
# List all simulator devices
xcrun simctl list devices
# Show disk usage per runtime
xcrun simctl runtime list -j | python3 -c "
import json, sys
data = json.load(sys.stdin)
for rt in data.get('runtimes', []):
name = rt.get('name', 'Unknown')
size = rt.get('sizeBytes', 0) / (1024**3)
print(f' {name}: {size:.1f} GB')
"
Delete Old Simulator Runtimes
# Delete a specific runtime (e.g., iOS 16.4)
xcrun simctl runtime delete "iOS 16.4"
# Delete ALL unavailable simulators (devices for uninstalled runtimes)
xcrun simctl delete unavailable
# Delete all simulators (nuclear option)
xcrun simctl delete all
# List what runtimes are available to delete
xcrun simctl runtime list | grep -v "== "
# Clean the CoreSimulator cache
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
Check Individual Simulator Sizes
# Size of each simulator device
for device_dir in ~/Library/Developer/CoreSimulator/Devices/*/; do
name=$(defaults read "${device_dir}device.plist" name 2>/dev/null || echo "Unknown")
runtime=$(defaults read "${device_dir}device.plist" runtime 2>/dev/null | sed 's/.*\.//' || echo "?")
size=$(du -sh "$device_dir" 2>/dev/null | cut -f1)
echo "$size $name ($runtime)"
done | sort -rh | head -15
2. Cleaning iOS DeviceSupport Files
Every time you connect an iPhone or iPad to your Mac for debugging, Xcode downloads 2-5GB of device support symbols for that specific iOS version. These files persist forever:
# List all iOS DeviceSupport directories with sizes
ls -la ~/Library/Developer/Xcode/iOS\ DeviceSupport/ | head -20
du -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport/*/ 2>/dev/null | sort -rh
# Remove device support for old iOS versions
# Keep only the versions you're actively debugging against
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/15.*
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/16.*
# watchOS DeviceSupport (often forgotten)
du -sh ~/Library/Developer/Xcode/watchOS\ DeviceSupport/*/ 2>/dev/null | sort -rh
rm -rf ~/Library/Developer/Xcode/watchOS\ DeviceSupport/*
# tvOS DeviceSupport
rm -rf ~/Library/Developer/Xcode/tvOS\ DeviceSupport/*
3. Cleaning Xcode Archives
Every time you archive an app for distribution, Xcode saves the entire archive (including dSYM files) in the Archives folder. These accumulate across app versions:
# Check total archive size
du -sh ~/Library/Developer/Xcode/Archives/
# List archives by date
ls -la ~/Library/Developer/Xcode/Archives/
# Delete old archives (keep recent ones for crash symbolication)
# Delete archives older than 6 months
find ~/Library/Developer/Xcode/Archives -name "*.xcarchive" -mtime +180 -exec rm -rf {} + 2>/dev/null
# Or manage through Xcode: Window → Organizer → Archives
4. SPM (Swift Package Manager) Cache
# SPM package cache
du -sh ~/Library/Caches/org.swift.swiftpm/ 2>/dev/null
du -sh ~/Library/org.swift.swiftpm/ 2>/dev/null
# SPM derived data (separate from Xcode DerivedData)
du -sh ~/Library/Developer/Xcode/DerivedData/*/SourcePackages/ 2>/dev/null | sort -rh | head -10
# Clean SPM cache
rm -rf ~/Library/Caches/org.swift.swiftpm/
rm -rf ~/Library/org.swift.swiftpm/repositories/
5. DerivedData Deep Clean
DerivedData contains build products, module caches, and index data for every project you've opened:
# Total DerivedData size
du -sh ~/Library/Developer/Xcode/DerivedData/
# Per-project breakdown
du -sh ~/Library/Developer/Xcode/DerivedData/*/ 2>/dev/null | sort -rh | head -20
# Delete all DerivedData (safest cleanup)
rm -rf ~/Library/Developer/Xcode/DerivedData/*
# Delete DerivedData for projects not modified in 30+ days
find ~/Library/Developer/Xcode/DerivedData -maxdepth 1 -type d -mtime +30 -exec rm -rf {} + 2>/dev/null
# Or from Xcode: Settings → Locations → Derived Data → (click arrow to reveal in Finder)
Using ClearDisk to Monitor Xcode Caches
ClearDisk -- Free, Open-Source Xcode Cache Monitor
Instead of running commands manually, ClearDisk sits in your menu bar and tracks all Xcode-related caches:
- CoreSimulator (iOS Simulators)
- iOS/watchOS/tvOS DeviceSupport
- DerivedData + Archives
- SPM + CocoaPods cache
- Plus: Docker, node_modules, Rust, Go, Maven, Homebrew, pip
View on GitHub -- MIT License, Swift/SwiftUI, macOS 14+
Install: brew tap bysiber/cleardisk && brew install --cask cleardisk
Complete Cleanup Script
Save this and run it when you need to reclaim space fast:
#!/bin/bash
# Xcode Simulator & DeviceSupport Cleanup Script
echo "=== Before Cleanup ==="
du -shc ~/Library/Developer/CoreSimulator ~/Library/Developer/Xcode 2>/dev/null | tail -1
# 1. Delete unavailable simulators
xcrun simctl delete unavailable 2>/dev/null
echo "Deleted unavailable simulators"
# 2. Clean CoreSimulator caches
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
echo "Cleaned CoreSimulator caches"
# 3. Clean old DeviceSupport (keep iOS 17+)
for ver in 14 15 16; do
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/${ver}.* 2>/dev/null
done
rm -rf ~/Library/Developer/Xcode/watchOS\ DeviceSupport/* 2>/dev/null
rm -rf ~/Library/Developer/Xcode/tvOS\ DeviceSupport/* 2>/dev/null
echo "Cleaned old DeviceSupport"
# 4. Clean old DerivedData
find ~/Library/Developer/Xcode/DerivedData -maxdepth 1 -type d -mtime +14 -exec rm -rf {} + 2>/dev/null
echo "Cleaned stale DerivedData"
# 5. Clean documentation cache
rm -rf ~/Library/Developer/Xcode/DocumentationCache/* 2>/dev/null
# 6. Clean SPM cache
rm -rf ~/Library/Caches/org.swift.swiftpm/ 2>/dev/null
# 7. Clean Xcode general caches
rm -rf ~/Library/Caches/com.apple.dt.Xcode/* 2>/dev/null
echo ""
echo "=== After Cleanup ==="
du -shc ~/Library/Developer/CoreSimulator ~/Library/Developer/Xcode 2>/dev/null | tail -1
How Much Space Will I Save?
| What You Clean | Expected Recovery | Risk Level |
|---|---|---|
| Unavailable simulators | 5-20GB | None |
| Old iOS DeviceSupport (14, 15, 16) | 5-15GB | None (re-downloads when needed) |
| watchOS/tvOS DeviceSupport | 2-5GB | None |
| Old DerivedData | 5-20GB | None (rebuilds on next open) |
| Old Archives | 2-10GB | Low (keep recent for crash reports) |
| SPM cache | 1-3GB | None (re-resolves packages) |
| CoreSimulator caches | 1-3GB | None |
| TOTAL | 20-70GB |
Frequently Asked Questions
Will deleting simulators break my projects?
No. Deleting simulator devices (xcrun simctl delete unavailable) only removes devices for runtimes that aren't installed. Your projects will create new simulator instances as needed. Deleting runtimes means you'd need to re-download them from Xcode settings if you want to test on those iOS versions again.
How often does DeviceSupport accumulate?
Every major and minor iOS update creates a new DeviceSupport directory. Over 2-3 years of iOS development, you can accumulate 10+ versions (iOS 14.x through 18.x), each consuming 2-5GB.
Can I delete everything in CoreSimulator?
You can safely delete ~/Library/Developer/CoreSimulator/Devices/ and Caches/. Xcode will recreate default simulator devices when you next open it. However, any custom simulator configurations will be lost.
What about Xcode itself -- can I have multiple versions?
Each Xcode version is about 12-15GB (plus platforms). If you need multiple Xcode versions (for different project requirements), that alone is 25-45GB. Consider keeping only the version you actively need and downloading others from the Apple Developer portal when required.
Does Xcode 16 clean up automatically?
Xcode 16 improved automatic cleanup of some caches, but simulators, DeviceSupport, and Archives still require manual cleanup. DerivedData gets partially cleaned but old project data persists.