2 Ways to Delete Derived Data in Xcode

Updated: February 8, 2023 By: A Goodman Post a comment

As you work with Xcode for a long time, your hard drive space becomes less and less free. The main reason is that a lot of things are created automatically when you build projects. The place where a large number of files were created this way is the DerivedData folder. Its size can be from a few hundred MB to dozens of GB. Luckily, you’re fine with deleting files in this folder. There will be no consequences to this action and the benefit you will gain is more space on your Mac.

This article shows you 2 different ways to delete derived data in Xcode 13, 14, and newer versions.

Using Your Mouse (Graphical User Interface)

1. Open Xcode and go to Xcode > Settings (or Preferences in Xcode 13) as follows:

2. Select the Locations tab from the menu bar. Focus on the Derived Data section. Here you will see the path of the DerivedData folder on your Mac. Click on the right arrow icon next to the path to quickly access this folder.

3. Open the DerivedData folder to view its content:

4. Delete every sub-folder inside DerivedData (it’s totally safe to do that). Don’t forget to empty your Trash later.

Using Command Line

You can clean the DerivedData folder by using just a single command. Open your terminal and run the following:

 rm -rf ~/Library/Developer/Xcode/DerivedData/*

Screenshot:

Final Words

We’ve gone over a few approaches to remove Xcode derived data so that we can get back a lot of free storage. If you’d like to explore more tips and tricks to get more productibility when working with Xcode, take a look at the following articles:

I have made every effort to ensure that every step in this article works properly, but I may have made some mistakes or omissions. If so, please leave a comment to report errors.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments