How to clean Xcode DerivedData safely
DerivedData is where Xcode keeps build products and indexes, and Xcode can recreate all of it. You can delete it once Xcode and any running builds have stopped, though the next build and indexing will take longer. Leave Xcode Archives and your project folders alone, because they live elsewhere and can’t be recreated.
Where DerivedData lives
By default it’s in ~/Library/Developer/Xcode/DerivedData, with one folder per project or workspace. Each folder name is the project name plus a random string, so they’re easy to tell apart. You can also get there from Xcode: open Settings, go to Locations, and click the small arrow next to the DerivedData path.
Archives sit next door in ~/Library/Developer/Xcode/Archives. They hold the builds you exported, plus the symbol files you need to read crash reports from those builds. Keep them out of this cleanup.
Simulator runtimes and device data need a different cleanup method
Deleting it by hand
If one project is misbehaving, delete only that project’s folder. If you want space back, sort the folders by date and remove the ones for projects you haven’t opened in a while.
- Let running builds, tests and previews finish, then quit Xcode.
- Open the DerivedData folder and look at each folder’s name, date and size.
- Move the project folders you picked to the Trash.
- Open your current project, let Xcode index and build it, and then empty the Trash.
What Mint adds
Mint’s Disk tab lists DerivedData under Rebuildable, split into rows so you can pick project by project. It ticks those rows only when Xcode and its build tools aren’t running, so they stay unticked during a build.
For ticked rows the button is Delete permanently, and Mint asks once. Moving build output to the Trash wouldn’t free anything until you emptied the Trash. The same scan also finds simulator caches, package manager caches and node_modules folders.
Frequently asked questions
Is it safe to delete Xcode DerivedData?
Yes, as long as nothing is building. Xcode recreates it. You pay with a slower next build and a fresh round of indexing.
Will deleting DerivedData delete my code?
No. Your source code lives in your project folder. Check the path before you delete so you don’t select a project or Archives folder by mistake.
Can the App Store edition of Mint clean DerivedData?
No. The App Store edition can’t reach ~/Library, so DerivedData cleanup is part of the Direct and Setapp editions.
See how much DerivedData you have
Run a scan in Mint, open Rebuildable, and delete the project folders you no longer need.