Developer guide · Windows and Mac
How to free up Xcode disk space without breaking anything
By Aqib Javed · Updated Oct 22, 2026
DerivedData (~/Library/Developer/Xcode/DerivedData) is a build cache that Xcode rebuilds, so it's safe to delete with Xcode closed. Unused simulator runtimes are removed in Xcode > Settings > Components, which shows how much each one takes. xcrun simctl delete unavailable removes simulators whose runtime is gone. Keep Archives: you need them to read crash reports for builds you shipped.
What's safe to delete, and what to keep
- Safe: DerivedData, the build cache. The next build of each project is slower while it rebuilds.
- Safe: iOS DeviceSupport folders for iOS versions your devices no longer run. Xcode copies them again when a device on that version connects.
- Safe: simulator runtimes you don't test on, and simulators you don't use.
- Safe: ~/Library/Developer/CoreSimulator/Caches.
- Keep: Archives (~/Library/Developer/Xcode/Archives). They hold the symbols for builds you shipped.
Clear DerivedData
Quit Xcode first. Xcode > Settings > Locations shows the DerivedData folder with an arrow that opens it in Finder; delete what's inside. Or from Terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData/*Remove simulator runtimes and simulators
Xcode > Settings > Components (Platforms in older versions) lists every installed runtime and how much space it uses; select one and delete it. The same from Terminal, plus clearing out simulators:
xcrun simctl runtime list
xcrun simctl runtime delete <identifier>
# simulators whose runtime is no longer installed
xcrun simctl delete unavailable
# one simulator, or reset it instead
xcrun simctl delete <UDID>
xcrun simctl erase <UDID>Trim iOS DeviceSupport
~/Library/Developer/Xcode/iOS DeviceSupport (and watchOS DeviceSupport) gets a folder for every OS version of every device you've plugged in. Delete the folders for versions you no longer run; keep the current one if you don't want Xcode to copy it again at the next connection.
Doing it with Stackyard
Stackyard's Xcode page on the Mac lists DerivedData, DeviceSupport, simulator caches, runtimes and simulators with their sizes and which simulators use each runtime. It moves caches to the Trash, deletes runtimes and simulators through simctl, and raises a fix when simulators won't start because their runtime is gone. Archives are left alone on purpose. It's free and open source.
Questions
Is it safe to delete DerivedData?
- Yes. It only holds build products and indexes, which Xcode recreates. The next build of each project takes longer.
Why didn't my free space change after deleting a runtime?
- macOS sometimes reports the space later, after it finishes cleaning up the runtime's disk image. Check again after a while or a restart.
Will deleting iOS DeviceSupport break building to my iPhone?
- No. Xcode copies the support files again the next time a device on that iOS version connects, which takes a few minutes.
What does xcrun simctl delete unavailable remove?
- Only simulators whose runtime isn't installed any more. Simulators you can still start are left alone.