Guide

Is it safe to delete Xcode DerivedData?

Yes — and it's often the single biggest reclaimable folder on a Mac used for iOS or macOS development. Here's what DerivedData actually is, how to clear it, and what other Xcode data is (and isn't) safe to remove.

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/DerivedData

This 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

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.

Free to scan

Find out how much space Xcode is hoarding.

Download RepoSweep