FYI: Xcode and Disk Space

I discovered a disk space issue with Xcode on my 1TB hard disk. Xcode doesn’t delete old or unused Simulators, causing them to mix and consume valuable space. Deleting them from the Window > Devices & Simulators menu didn’t work, so I used Disk Utility to find and delete them. However, they persisted.

To regain disk space, I completely removed Xcode and the Developer Folder. After reinstalling Xcode, I regained about 80% of my disk space. Despite unmounting the Simulators, they remained.

For those unable or unwilling to do this, the Mac App Store offers DevCleaner, a utility that removes old Xcode Cache and Simulators.

Thanks. I hope I've helped someone else.

Dan Uff

The amount of space Xcode uses has been increasing over the years to tremendous levels. In my case I have several different phones, and several different apps and if you build different apps and run on different phones then the amount of things Xcode squirrels all over the place is astonishingly phenomenally vast. I use the DaisyDisk app to help identify what and where Xcode is consuming massive amounts of storage space.

I recently encountered a similar issue. To resolve it, I first listed all the devices from Terminal using the following command:

xcrun simctl list devices

Next, I selected the devices I wanted to delete and executed the following command, replacing DEVICE_UUID with the actual device ID obtained from the previous command:

xcrun simctl delete DEVICE_UUID

Alternatively, you can delete all the devices by executing the following command:

Note: The commands below will erase all simulator data and applications.

xcrun simctl delete all

Other appropriate methods include deleting devices directly from the following location:

~/Library/Developer/CoreSimulator/Devices

Then, execute the following command:

xcrun simctl delete unavailable

Also, If you have unused old runtimes, delete them. List them using:

xcrun simctl list runtimes

Then, go to Settings > General > Storage > Developer to remove unused runtimes.

FYI: Xcode and Disk Space
 
 
Q