How to Delete Xcode Derived Data and Free Up Space
What Is Xcode Derived Data
Xcode Derived Data is a cache folder where Xcode stores build products, indexes, and logs for every project you work on. Each project gets its own subfolder with compiled code, module caches, and intermediate build files. Over time, this folder becomes one of the largest space consumers on any developer's Mac.
The path is ~/Library/Developer/Xcode/DerivedData. If you have been using Xcode for a year or more, this folder might contain 10 to 40 GB of data. Since it is all cached and regenerated automatically, deleting it is one of the most effective ways for developers to how to clean up mac storage.
How to Delete Derived Data from Xcode
The easiest way is through Xcode itself. Open Xcode, go to the Settings menu with Command + Comma, click the Locations tab, and click the small arrow next to the Derived Data path. This opens the folder in Finder. Select all contents and move them to Trash.
Alternatively, you can delete derived data for a specific project. In Xcode, go to the Product menu and choose Clean Build Folder or press Command + Shift + K. This removes build products for the current project only. For a full cleanup, deleting the entire DerivedData folder contents is more effective and helps you how to clean up mac.
Reclaim Mac finds and removes junk files automatically.
Deleting via Terminal
For a quicker approach, open Terminal and run the rm command with the recursive flag on ~/Library/Developer/Xcode/DerivedData. This removes everything inside the folder instantly. The next time you build a project in Xcode, it creates a new subfolder and compiles from scratch.
Your first build after clearing Derived Data takes longer because everything needs to recompile. But this is a one-time cost, and subsequent builds are normal. For developers working on multiple projects, this is the fastest way to how to clean up mac storage.
Other Xcode Storage Consumers
Derived Data is just the start. Xcode also stores data in several other locations. Archives at ~/Library/Developer/Xcode/Archives contain old app submissions and builds. Device support files at ~/Library/Developer/Xcode/iOS DeviceSupport store debug symbols for every iOS version you have connected a device with. Each version is 2 to 5 GB.
Delete support files for iOS versions you no longer test on. Delete old archives you no longer need. These are hidden giants that make Xcode one of the biggest storage consumers on developer Macs.
Simulator Cleanup
iOS simulators are another major Xcode storage consumer. Go to ~/Library/Developer/CoreSimulator/Devices to see simulator data. Each simulator runtime takes 3 to 5 GB. Old simulators you don't use for testing anymore can be removed.
In Xcode, go to Window, then Devices and Simulators, then the Simulators tab. Delete old simulator configurations. Also go to Xcode Settings, Platforms, and remove old iOS simulator runtimes. This part of how to clean up mac can save 10 to 20 GB.
Creating a Developer Cleanup Routine
Set a monthly reminder to clean Xcode data. Clear the DerivedData folder. Review archives and delete old ones. Check simulator runtimes and remove outdated versions. This routine takes five minutes and can prevent Xcode from consuming 50 GB or more over time.
Clean your Mac in 60 seconds
Lifetime license. Offline. No subscription.