DiskBroomWhat it cleans › How to delete Xcode DerivedData safely

Cleaning guide

Xcode DerivedData is safe to delete. Here's how.

~/Library/Developer/Xcode/DerivedData

What it is

DerivedData is Xcode's scratch space: compiled build products, indexes, module caches, and logs for every project you've opened. Xcode rebuilds all of it from source the next time you build — none of your code lives here.

How big it gets

Commonly 2–20 GB; machines that touch many projects accumulate 50 GB or more. A single large project's subfolder can pass 5 GB on its own.

What happens if you delete it

Nothing is lost. Your next build takes longer (a full rebuild and re-index), and that's the entire cost. This is the single most-deleted folder in Mac development for a reason.

How to remove it manually — free, no app needed

  1. Quit Xcode (a running Xcode may recreate or lock folders mid-delete).
  2. In Finder, choose Go → Go to Folder… and paste: ~/Library/Developer/Xcode/DerivedData
  3. Select everything inside the folder and move it to the Trash. Keeping the DerivedData folder itself is fine.
  4. Empty the Trash when you're comfortable. Terminal alternative: rm -rf ~/Library/Developer/Xcode/DerivedData

Risk rating

Safe. Rebuilt automatically from your source code on the next build. No unique data ever lives here.

Prefer not to do this by hand every time? DiskBroom scans this location (and every other one on its published list), shows the size, rates the risk with the same shape you see above, and asks before anything moves — everything goes to the Trash, never past it. Scanning is free forever.

Download DiskBroom free

More cleaning guides

← Everything DiskBroom can clean · FAQ