How to delete Xcode DerivedData, simulators and device support files safely
Xcode quietly collects tens of gigabytes. Most of it rebuilds itself, but not all of it. Updated 20 October 2026.
DerivedData: safe, costs a rebuild
~/Library/Developer/Xcode/DerivedData holds build output and indexes for every project you've opened, one folder per project. Xcode recreates it the next time you build, so deleting it never touches your source code or project settings.
- Quit Xcode.
- Open Xcode → Settings → Locations and click the arrow next to Derived Data to show the folder in Finder.
- Move the folders for projects you no longer work on to the Trash. Clear everything only if you're fixing a stubborn indexing or build problem.
What it costs: the next build and index of each project starts from scratch, which can take a few minutes for a big app.
Device support files: safe, costs a re-copy
~/Library/Developer/Xcode/iOS DeviceSupport (and watchOS DeviceSupport) hold debug symbols copied from each device and OS version you've connected. Old versions you no longer test on are safe to remove. If you connect a device running that version again, Xcode copies the symbols again, which takes a few minutes.
Simulators: use Xcode's own tools
- Simulators for runtimes you've removed: run
xcrun simctl delete unavailablein Terminal. It only deletes simulators that can no longer run. - Whole simulator runtimes (several GB each): remove old ones in Xcode → Settings → Components (called Platforms in older versions). Don't delete runtime folders from Finder, because Xcode keeps its own records of them.
- Simulator caches in
~/Library/Developer/CoreSimulator/Cachesare rebuilt the next time a simulator starts. - SwiftUI preview data in
~/Library/Developer/Xcode/UserData/Previewsis recreated the next time you open a preview.
Keep: Archives
~/Library/Developer/Xcode/Archives holds the builds you exported or uploaded, with the dSYM files you need to read crash reports from those versions. They can't be rebuilt exactly. Delete an archive only when you're sure you'll never need to symbolicate a crash from that release.
Swift packages
A Swift package's .build folder sits next to its Package.swift and is rebuilt by swift build. Package downloads are cached in ~/Library/Caches/org.swift.swiftpm and fetched again when needed.
Doing it without guessing
CheckMac's Suggested Cleanup finds DerivedData, device support files, simulator caches, preview data and Swift .build folders, shows each one's size and what rebuilds it, and never suggests Archives. Nothing moves until you've reviewed it in the Discard Pile.


See it on your own Mac. CheckMac maps any folder or drive as a sunburst or treemap, and Suggested Cleanup lists the caches and build output a tool can rebuild, with what each one costs you. Scanning is free, and Suggested Cleanup is free for its first three runs.
More guides
- What is System Data on Mac, and how do you reduce it?
- Is it safe to delete node_modules, caches and build folders on a Mac?
- Looking for a CleanMyMac alternative?
- Mac storage almost full on a 256 GB Mac: what to do
- How to see what's taking up space on your Mac
- Free up disk space on a Mac for developers: a checklist
- Docker taking up space on Mac: Docker.raw explained
- How to delete local AI models on a Mac: Ollama, LM Studio and Hugging Face
- How to delete old iOS simulators and simulator runtimes
- Purgeable space on a Mac: what it is and how to clear it