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.

Also look under the "Other Installed Platforms" section in Xcode settings. It is those platforms that are taking up space in /Library/Developer/CoreSimulator. You can remove, from Xcode, the one that you don't need.

If anyone has having an issue with simulated OS and old OS images that keeps reinstalling and remounting no matter how many times you remove and no rosetta applications running at the time.

Remove and Unmount them in Xcode then very important Search for this file below and isolate it in a closed container like a zip for repair purposes, otherwise get rid of this maliciously buggy aggressive virus like file.

com.apple.CoreSimulator.CoreSimulatorService

I had tried this method that @i3z and others just like it have posted on other forums. Even had the Optimize Mac Storage setting off, I ended up trying this when all other solutions on internet failed now I got to find the hidden or buggy switch to toggle this back off using the CrApple give 1 new feature hide or remove at least 4 cycle of software delivery. I found this file to be the malicious file by watching the launchd.log in console. These files also killed my backups and repeated either failed or filled them with wasted space like Mac's problematic purgeable data where you have to write zeroing code to purge it like the janky setup fixes that people have to do dealing with powdered noises of The Garden of rotten Apples.

Any questions reach out. I have not seen any draw back from this deletion not that I could fix it with TimeCapsole cause it broke that too.

FYI: Xcode and Disk Space
 
 
Q