Can I move Xcode files to an external SSD safely?

Hi everyone, I’m running out of space on my Mac and I need to use an external SSD to free up room, especially because Xcode is taking a lot of storage. I want to know if it’s safe to move some Xcode files—projects, derived data, or system-related files—to an external SSD. Which files can I move safely, and which should stay on the internal drive? I want to avoid breaking anything or causing issues with Xcode or macOS.

Also, is it the same situation if I use an external HDD instead of an SSD? Are there additional risks or performance issues to consider?

The only parts of Xcode that can't be moved to external storage are the parts that take up the bulk of your storage.

You haven't said anything about your storage (internal or external) or your development needs, so I can't provide any more detailed information.

In some cases, you can reduce Xcode's storage. You may be able to remove some or all of the simulator runtimes.

Generally speaking, this is one of those cases where you have to weight the cost of your time and trouble against the cost of a computer with more internal storage.

First up, make sure your external drive is formatted as APFS (or HFS Plus). If you do a lot of Mac-specific stuff on, say, FAT32, you will eventually run into weird problems.

Second, there are a number of things you can definitely move to an external drive:

  • Xcode itself
  • The three items (Derived Data, Archives, Compilation Cache) listed in Xcode > Settings > Locations.

After that things start to get more complex.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Don't use the comment feature here in the forums. It's hides your response.

Unfortunately, a 256 GB with Xcode is going to be a significant challenge. I've had problems with my 1 TB drive. One of the more problematic issues with Xcode are all the iOS simulator runtimes. Perhaps you could try to delete all of those except one.

Or perhaps you could look into a cloud server. Sometimes those have small drives too. If you only need it for a couple of days, AWS might be more cost effective than a monthly fee.

Can I move Xcode files to an external SSD safely?
 
 
Q