Xcode: Change Derived Data and Archives directories

Updated: April 25, 2022 By: A Goodman Post a comment

After running and building many projects with Xcode, you will notice that the free storage of your Mac has reduced drastically. If you’re using a Macbook with only 256GB of SSD, it’s very likely that your remaining free space isn’t so much.

The Derived Data and Archives folders (generated by Xcode) may take from a few hundred MB to more than half of your disk capability. The default paths of these two folders are:

  • /Users/<your username>/Library/Developer/Xcode/DerivedData
  • Users/<your username>/Library/Developer/Xcode/Archives

You can set custom locations for them by following the steps below.

1. Go to Xcode > Preferences:

2. Select Locations from the menu bar:

3. Click on the drop-down menu next to Derived Data or Archives then select Custom. After that, click on the little folder icon to browse your desired location (it can be somewhere on your Mac or on external storage):

Set custom directory for Derived Data
Set custom location for Archives


Further reading:

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 or send me an email to [email protected] to report errors.

Notify of
Inline Feedbacks
View all comments