Guide
Xcode taking up too much space? What to delete
Xcode can quietly use tens of gigabytes. What DerivedData, Archives, device support and simulators are, what is safe to delete, and how.
Updated 7 min read
Xcode is one of the hungriest apps on a Mac. The app is only the start: every build, archive, connected device and simulator leaves data behind, and it is common for Xcode to use tens of gigabytes. Here is what each part is, which parts are safe to delete, and how to delete them.
Where the space goes
Most of it is under ~/Library/Developer. To see the sizes, run:
du -sh ~/Library/Developer/Xcode/* ~/Library/Developer/CoreSimulator/* 2>/dev/null | sort -h
1. DerivedData: safe to delete
Build products and indexes in ~/Library/Developer/Xcode/DerivedData. Xcode recreates them on the next build. See how to delete DerivedData.
2. Archives: keep the ones you need
Every Product → Archive is saved in ~/Library/Developer/Xcode/Archives. Open Window → Organizer to see them by app and date, and delete old ones there. Keep the archives, or their dSYM files, for versions people still use, so you can symbolicate their crash reports.
3. Device support files: safe to delete
Each time you connect a device running a new OS version, Xcode copies its debugging symbols to folders such as ~/Library/Developer/Xcode/iOS DeviceSupport, often several gigabytes per version. Delete the folders for OS versions you no longer test on. Xcode recreates a folder the next time it needs it.
4. Simulators: delete the ones you don't use
- Remove simulators whose runtime is no longer installed:
xcrun simctl delete unavailable - Delete individual simulators in Window → Devices and Simulators.
- Remove whole simulator runtimes you don't need, often several gigabytes each, in Xcode → Settings → Platforms (called Components in newer versions), or list and delete them with
xcrun simctl runtime listandxcrun simctl runtime delete.
5. Caches: safe to delete
Xcode's own cache in ~/Library/Caches/com.apple.dt.Xcode and simulator caches in ~/Library/Developer/CoreSimulator/Caches are rebuilt as needed. Quit Xcode and the Simulator before deleting them.
6. Old copies of Xcode
If you keep older versions of Xcode side by side, such as Xcode-15.app, each one takes several gigabytes in Applications. Remove the versions you no longer build with.
Don't forget package caches
CocoaPods, Swift Package Manager, npm and Homebrew keep their own caches. See how to clear npm, Yarn, pnpm, Bun and Homebrew caches.
Clean up Xcode with Roomy
Roomy's Developer cleanup finds DerivedData, device support files, SwiftUI preview builds, the Xcode cache, simulator caches and archives in one scan. DerivedData and caches are rated Safe, device support files Review, and archives Caution, so archives are never selected for you. Its Optimize screen can also delete unavailable simulators in one click.
Frequently asked questions
How much space does Xcode use?
The app itself takes several gigabytes, and simulator runtimes add several more each. With DerivedData, archives, device support files and simulators, it is common for Xcode to use tens of gigabytes on an active developer's Mac.
Is it safe to delete iOS DeviceSupport folders?
Yes. They hold debugging symbols for iOS versions of devices you have connected. Xcode recreates a folder the next time you connect a device running that version, which takes a few minutes.
Can I delete Xcode archives?
Yes, but keep the archives, or at least the dSYM files, of app versions people still use. Without them you can't symbolicate crash reports from those versions.