Xcode DerivedData: Is It Safe to Delete?

Low riskApple developmentUpdated

Facts from the app
Location
  • ~/Library/Developer/Xcode/DerivedData
Risk level
Low riskRebuilt automatically by macOS or the app that made it. Freshist selects these for you — you still see every item before anything moves.
Selected by default
Yes
What Freshist does
Moves the selected items to the Trash, so you can undo. Nothing is deleted outright.
In the app
Clean → Xcode Derived Data — “Xcode build products — next builds recompile from scratch and take longer.”

From Freshist's own cleaning rules — the same catalog the app uses.

What lives in DerivedData

Every time Xcode builds a project, it writes the results into a per-project folder inside DerivedData: compiled build products, intermediate object files, logs, and the index Xcode uses for code completion, jump-to-definition and search. None of it is source code — it's all generated from your project.

Why it gets large

Xcode creates one folder per project or workspace and keeps it around after you stop working on that project. If you try sample code, switch branches often or work on many apps, folders for projects you'll never open again stay on disk.

What happens after you clear it

The next build of each project starts from scratch, so it takes longer than an incremental build, and Xcode re-indexes the project in the background. After that first build, everything works as before.

Clearing it by hand

  1. Quit Xcode.
  2. In Finder, choose Go → Go to Folder… and enter ~/Library/Developer/Xcode/DerivedData.
  3. Delete the folders for the projects you want to reset — or all of them.

Xcode also shows the DerivedData location under Settings → Locations.

When to keep it

If you're in the middle of work on a large project, keep that project's folder: clearing it means waiting for a full rebuild and re-index before you're productive again.

Frequently asked questions

Will deleting DerivedData delete my code or projects?

No. Your source code and project files live in your project folders. DerivedData only holds what Xcode generated from them, and Xcode regenerates it on the next build.

Why does DerivedData keep growing?

Xcode creates a separate folder for each project and workspace you open, and doesn't remove folders for projects you no longer work on. Old projects keep their build output until you clear it.

Should I quit Xcode before clearing it?

Yes. Quitting Xcode first avoids clearing files that a running build or the indexer is using at that moment.

Keep reading