What DerivedData is
~/Library/Developer/Xcode/DerivedData holds build intermediates, module caches, indexes, and build logs for every project you've opened in Xcode. It grows with every project and every branch you build, and Xcode never cleans it up on its own. Multi-gigabyte DerivedData folders are completely normal; 20–50 GB is common on active machines.
All of it is regenerable: delete it, and Xcode rebuilds what it needs on the next build. The only cost is that the first build afterwards is slower and indexing runs again.
Clearing it manually
For the current project, Xcode's Product → Clean Build Folder (⇧⌘K) clears part of it. To remove everything:
rm -rf ~/Library/Developer/Xcode/DerivedDataThis works, but it's all-or-nothing — you lose warm caches for projects you're actively working on too, and rm -rf offers no undo if you mistype the path.
The other places Xcode hides space
- iOS DeviceSupport (
~/Library/Developer/Xcode/iOS DeviceSupport) — debug symbols for every device and iOS version you've ever plugged in. Old versions are safe to remove; they re-download from the device when needed. - Simulator caches (
~/Library/Developer/CoreSimulator/Caches) — regenerable. - CocoaPods and Swift Package Manager caches — re-downloaded on demand.
What you should not delete: Xcode Archives contain the debug symbols (dSYMs) you need to symbolicate crash reports from shipped builds — deleting them is permanent in a way that matters. Provisioning profiles and simulator devices should also only be removed deliberately.
Doing it with a safety net
RepoSweep scans these locations for you: DerivedData per project, device support symbols, simulator caches, plus the npm, Homebrew, CocoaPods, SPM, Gradle, Maven, and Cargo caches. It shows what each item is, how it regenerates, and how big it is — and deliberately never offers archives, provisioning profiles, or simulator devices. Everything you clean goes to macOS Trash, so it's reversible until you empty it.
Scanning is free without limits. Download for macOS 14+; a one-time $12 license unlocks cleanup — no subscription.