Xcode taking up too much space? What's safe to delete (DerivedData, DeviceSupport, Simulators)
If you build for iOS, ~/Library/Developer can quietly grow to tens of gigabytes. Almost everything in it is recreated by Xcode — but not everything. This guide covers each folder, what it holds, the risk of deleting it, and the command to do it by hand.
1. Measure first
du -sh ~/Library/Developer/Xcode/* ~/Library/Developer/CoreSimulator/* 2>/dev/null | sort -h
2. Safe to delete 🟢
DerivedData
~/Library/Developer/Xcode/DerivedData holds intermediate builds and the index of every project you've opened. It's the folder that grows the most and the safest to clear: Xcode rebuilds it on the next build (which will be slower, and code completion lags until indexing finishes).
rm -rf ~/Library/Developer/Xcode/DerivedData/*
From Xcode: Settings › Locations, click the arrow next to the Derived Data path and delete the folders in Finder.
iOS DeviceSupport
Every time you connect an iPhone, iPad, Apple Watch or Apple TV running a new OS version, Xcode copies that version's debug symbols into ~/Library/Developer/Xcode/iOS DeviceSupport (plus watchOS, tvOS and visionOS DeviceSupport). That's a few GB per version, and old ones are never removed.
ls ~/Library/Developer/Xcode/"iOS DeviceSupport"
# delete the versions you no longer use, e.g.:
rm -rf ~/Library/Developer/Xcode/"iOS DeviceSupport"/"iPhone15,2 17.0 (21A329)"
If you connect a device with that version again, Xcode copies the symbols again.
Simulator caches
~/Library/Developer/CoreSimulator/Caches (and /Library/Developer/CoreSimulator/Caches, which needs an admin password) hold simulator system caches. They're rebuilt the next time Simulator starts.
App installation deltas
~/Library/Containers/com.apple.CoreDevice.CoreDeviceService/Data/Library/Caches/AppInstallationBinaryDeltas keeps pieces of every install Xcode pushed to your device. It's pure cache.
3. Needs care 🟡
Simulator devices
~/Library/Developer/CoreSimulator/Devices has one folder per simulator, with its installed apps and data. Deleting it loses that state (logins, test data). Use simctl:
# delete simulators whose iOS runtime is no longer installed
xcrun simctl delete unavailable
# list what's left
xcrun simctl list devices
# wipe the contents of all simulators (keeps the simulators)
xcrun simctl erase all
Simulator runtimes
Each simulator iOS version is a multi-GB image. Remove the ones you don't use in Xcode › Settings › Components (Platforms in older versions) or from the terminal:
xcrun simctl runtime list
xcrun simctl runtime delete <identifier>
Archives
~/Library/Developer/Xcode/Archives keeps every Product › Archive you've made, including dSYMs. You need them to symbolicate crashes from shipped versions and to re-export a build. Delete only old ones, from Window › Organizer, and keep the archives of versions still in the stores.
4. Summary
| Folder | Risk | Comes back by itself? |
|---|---|---|
| DerivedData | 🟢 low | Yes, on the next build |
| iOS DeviceSupport | 🟢 low | Yes, when you connect the device |
| CoreSimulator/Caches | 🟢 low | Yes |
| AppInstallationBinaryDeltas | 🟢 low | Yes |
| CoreSimulator/Devices | 🟡 medium | No: loses simulator apps and data |
| Archives | 🟡 medium | No: loses dSYMs of shipped versions |