Xcode Using 90GB with ~/Library/Developer — What Can I Safely Clean?

Hi everyone, I’m an iOS developer working on a Mac with limited storage (256 GB).

I’ve noticed that the ~/Library/Developer folder is taking up almost 90 GB, mainly due to Xcode-related content. Inside it I see folders like:

  • Xcode/DerivedData
  • DocumentationCache
  • iOS DeviceSupport
  • UserData
  • CoreSimulator/Devices

Before deleting anything, I’d like to understand which of these folders are safe to clean up, and what the potential side effects might be (for example, rebuild times, simulator re-downloads, etc.).

What is the recommended best practice to manage disk space when using Xcode on a low-storage machine?

Thanks in advance for your help.

Answered by Scott in 871912022

The easy ones:

  • You can delete DerivedData at any time. It grows back as you load and build projects.
  • In iOS DeviceSupport you can delete any OS versions that don't correspond to devices you actually use for debugging. That could be old versions (after you install OS updates on your devices) or devices you just don't use any more.
Accepted Answer

The easy ones:

  • You can delete DerivedData at any time. It grows back as you load and build projects.
  • In iOS DeviceSupport you can delete any OS versions that don't correspond to devices you actually use for debugging. That could be old versions (after you install OS updates on your devices) or devices you just don't use any more.

What Scott said plus:

  • DocumentationCache is pretty much what it says on the tin. You can delete it, but Xcode will have to rebuild it (although that rebuild is likely to be smaller). If you do delete it, I recommend that you delete DocumentationIndex at the same time.
  • For CoreSimulator, it’s probably best to not monkey with that yourself but instead manage it via either Window > Devices & Simulators in Xcode or the simctl command-line tool.

And in all cases, make sure that Xcode is quit before you start deleting stuff behind its back.

Share and Enjoy

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

Xcode Using 90GB with ~/Library/Developer — What Can I Safely Clean?
 
 
Q