Guides

Is it safe to delete Xcode's DerivedData?

Yes. DerivedData is rebuilt the next time you build. Here's what it holds, what else in Xcode's folders is safe to clear, and what isn't.

Last checked 29 September 2026

Yes. DerivedData holds what Xcode builds from your source code: compiled products, intermediate files, indexes and logs. Nothing in it is your work. Delete it and Xcode rebuilds what it needs on the next build, which will take longer once. It’s often the largest thing on a developer’s disk: 10 to 50 GB is common.

Where it is

~/Library/Developer/Xcode/DerivedData

Each project has its own folder in there, named after the project with a random suffix. You can remove one project’s folder, or all of them.

How to delete it

  1. Quit Xcode, so it isn’t writing to the folder while you remove it.
  2. In Finder, choose Go › Go to Folder, paste the path above, and drag the folders you want to remove to the Trash.
  3. Empty the Trash to get the space back.

Or in Terminal:

rm -rf ~/Library/Developer/Xcode/DerivedData/*

Unlike the Trash, rm can’t be undone. That’s fine for DerivedData, which rebuilds; be careful pointing it anywhere else.

What else in Xcode’s folders is safe to clear

Device support files: safe

~/Library/Developer/Xcode/iOS DeviceSupport

One folder per iOS version of every device you’ve ever connected, often several gigabytes each. Xcode copies the files again the next time that device connects. Remove the ones for iOS versions you no longer run.

Unavailable simulators: safe

Simulators for runtimes you’ve since removed stay on disk. This command deletes only the ones Xcode can no longer run:

xcrun simctl delete unavailable

Archives: keep, unless you’re sure

~/Library/Developer/Xcode/Archives

These are the builds you submitted to the App Store, with the debug symbols you need to read crash reports from those versions. Don’t delete an archive for a version people still use.

Other developer caches that rebuild themselves

Why it matters beyond disk space

macOS swaps memory to the startup disk. On a nearly full disk it has nowhere to put it, and a Mac that was slightly slow starts to stall. Freeing developer caches is one of the quickest ways to give swap room again. More on what makes a Mac slow.