Xcode Derived Data
Also known as: DerivedData, clear Xcode cache, Xcode build cache
Derived Data is the folder where Xcode stores build products, indexes, and intermediate files for your projects. It can grow to tens of gigabytes and is safe to delete — Xcode rebuilds it on the next build.
- Lives in ~/Library/Developer/Xcode/DerivedData
- Holds build products and the source index, not your code
- Safe to delete; Xcode rebuilds it next build
What Derived Data holds
For each project, Xcode writes compiled output, module caches, and the source index used for autocomplete and search to `~/Library/Developer/Xcode/DerivedData`. These are all regenerable artifacts, not your source code, so removing them never touches your project files.
The folder grows with every project you open and rarely shrinks on its own, which is why it is one of the largest hidden caches on a developer’s Mac.
How to clear it safely
In Xcode, choose Window > Projects, then click Delete next to a project’s Derived Data, or quit Xcode and delete the `DerivedData` folder directly in Finder > Go > Go to Folder (`~/Library/Developer/Xcode/DerivedData`). Clearing it also fixes many stale-build and indexing problems; the trade-off is a slower first build while Xcode regenerates everything.