What fills an iOS or Mac developer’s Mac, and what Xcode makes again
- Xcode’s own folders, mostly. Build data, simulators, simulator runtimes and debug symbols copied from your devices take most of the space, followed by an archive of every build you exported or uploaded.
- What it costs you: clearing build data or device symbols costs a slower first build, or a fresh copy the next time you connect a device. Runtimes download again.
- Keep: archives of builds people still run, which hold the dSYMs for reading their crash reports, and any simulator with test data you need.
1. What fills an iOS developer’s Mac
Almost all of it sits in ~/Library/Developer, which Finder hides. The parts, and what happens when each one goes:
| What fills it | Where it lives | Comes back? | More |
|---|---|---|---|
| Build data and indexes, one folder per project | ~/Library/Developer/Xcode/DerivedData | Yes, on the next build | DerivedData |
| Simulators, with their installed apps and data | ~/Library/Developer/CoreSimulator/Devices | Recreated empty | Simulators |
| Simulator runtimes, one per OS version | Listed in Xcode › Settings › Components | Downloaded again | Simulators |
| Debug symbols from devices you’ve connected | ~/Library/Developer/Xcode/iOS DeviceSupport, and a folder like it per platform | Copied again when that device connects | Device support |
| Archives of builds you exported or uploaded | ~/Library/Developer/Xcode/Archives | No | Archives |
| SwiftUI preview simulators | ~/Library/Developer/Xcode/UserData/Previews | Recreated when a preview runs | — |
| Swift packages | ~/Library/Caches/org.swift.swiftpm, and each package’s .build | Yes, resolved and built again | SwiftPM caches |
| CocoaPods | ~/Library/Caches/CocoaPods, each project’s Pods | Yes, with pod install | CocoaPods |
| A second Xcode, often a beta | Applications | Only by downloading it again | — |
| Restore images for iPhones and iPads | ~/Library/iTunes/iPhone Software Updates | Downloaded again when needed | .ipsw files |
Their sizes, biggest last; folders you don’t have are skipped:
du -sh ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/Xcode/Archives ~/Library/Developer/Xcode/*DeviceSupport ~/Library/Developer/Xcode/UserData/Previews ~/Library/Developer/CoreSimulator ~/Library/Caches/org.swift.swiftpm ~/Library/Caches/CocoaPods 2>/dev/null | sort -h
Then the simulators and runtimes themselves:
xcrun simctl list devices
xcrun simctl runtime list
2. What’s safe to clear, and what to keep
Clear freely
- DerivedData: quit Xcode and delete what’s inside,
rm -rf ~/Library/Developer/Xcode/DerivedData/*. Each project re-indexes and rebuilds the next time you open it. Product › Clean Build Folder clears just one project’s build products. - Unavailable simulators:
xcrun simctl delete unavailableremoves simulators for OS versions you no longer have installed. - Runtimes: Xcode › Settings › Components shows each installed runtime with the space you’d recover, and the info button next to one deletes it. Keep the runtimes for the OS versions you test on.
- Old device support: keep the folder for the OS your test devices run now. Older ones are copied again if you connect a device on that version.
- Package caches:
pod cache clean --allfor CocoaPods. The SwiftPM cache folder can go with Xcode quit; packages resolve again on the next build.
Think before deleting
- Archives. An archive keeps the dSYMs that turn a crash report from that build into readable stack traces. Delete archives of versions nobody runs from Xcode’s Organizer (Window › Organizer), and keep each version still in the App Store or TestFlight.
- Simulators with data. A simulator holds its installed apps and their data: signed-in test accounts, seeded databases.
xcrun simctl erase <device>empties one but keeps it; deleting removes it. - A second Xcode. Move it to the Trash once no project or CI script needs that version.
3. How SiftMac helps with Xcode
SiftMac’s developer files know Xcode’s folders, and judge each by how long you’ve left it alone: 1, 3 or 6 months, your choice.
- DerivedData is listed per project, named after the project, when the project is gone or hasn’t been opened in that time. Xcode’s shared
ModuleCache.noindexstays. - Device support: the newest folder for each platform always stays; older ones unused for that long are listed.
- Simulators whose OS version is no longer installed, and ones not started for that long, are listed with their name and OS and removed with
xcrun simctl delete, the way Xcode does it. A booted simulator is in use and skipped. - Swift Package Manager and CocoaPods caches get the verdict Rebuilds, as do a Swift package’s
.buildand a project’sPodsin projects you’ve stopped changing. - Old
.ipswrestore images show up under System Data.
It doesn’t list archives or simulator runtimes: archives are yours, and runtimes belong to Xcode’s Components settings. Developer items start unticked and are deleted rather than shelved, since Xcode makes them again.
4. A cleanup routine for Xcode users
- Note the OS versions your test devices and deployment target need. Device support and runtimes for anything older are candidates.
- Quit Xcode and Simulator.
- Clear DerivedData, or only the stale projects SiftMac lists.
- Run
xcrun simctl delete unavailable, then checkxcrun simctl list devicesfor simulators you never boot. - In Xcode › Settings › Components, delete runtimes for OS versions you no longer test on.
- Delete older device support folders, keeping the newest for each device you test on.
- In the Organizer, delete archives of builds nobody runs, keeping one for each live version.
- Open your current project and build it once, so it’s indexed before you need it.
Questions
Will deleting DerivedData lose code or settings?
No. DerivedData holds build products, indexes and logs that Xcode makes from your code. Your projects, schemes and Xcode settings live elsewhere. The cost is one slower build and a re-index per project.
Is it safe to delete iOS DeviceSupport?
Yes. It’s debug symbols Xcode copied from devices you’ve connected, one folder per OS version. If you connect a device running a version you removed, Xcode copies its symbols again, so that first connection is slower.
Can I delete the whole CoreSimulator folder?
Better not by hand. Simulators are tracked by simctl and runtimes are managed in Xcode’s Components settings, so delete simulators with xcrun simctl delete and runtimes in Xcode. Quit Simulator first either way.
How SiftMac handles it. SiftMac lists DerivedData per project, older device support folders and unused or unavailable simulators, removes simulators through simctl, and never lists archives, simulator runtimes or a simulator that’s running.
Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works