How to Safely Delete Xcode DerivedData and Reclaim 30+ GB
If you develop iOS or macOS apps, your disk space is likely disappearing into a directory called DerivedData. Here is why it grows so large, what happens when you purge it, and how to do it safely.
What is Xcode DerivedData?
Whenever you build, test, or index a project in Xcode, macOS stores intermediate compilation objects, precompiled headers, Swift module caches, and index stores in:
For active developers working on multiple branches or dependencies (Swift Packages, CocoaPods), this single directory frequently explodes to 30 GB to 100 GB.
Is It Safe to Delete?
Yes, 100% safe. DerivedData does not contain your source code, Git commits, or project settings. It contains only cached compilation outputs.
Method 1: Safe Automatic Cleanup with DiskWarren
Instead of navigating hidden Library directories or writing risky terminal scripts, DiskWarren automatically detects Xcode DerivedData, simulator device logs, and old archive symbols:
- Launch DiskWarren.
- Click Developer Storage Intelligence.
- Review the exact size and age of your DerivedData folder.
- Click Move to Trash. Items are safely recycled, giving you instant Put Back protection.
Method 2: Manual Deletion via Terminal
If you prefer manual deletion, close Xcode first, then run:
rm -rf permanently deletes files without placing them in the macOS Trash.Clean Xcode & Developer Caches Safely
Download DiskWarren for macOS • 100% Native & Private