Today I was checking the available disk space I had on my MacBook and noticed that it was more than
50% full. That definitely didn’t sound right so I used a disk space analyzer to check things out (I use DaisyDisk, you can download it here).
It turns out the culprit was our old friend, Xcode, and its
Device Support files. Xcode stores
Device Support files for every iOS version release and for every device that you plug into your Mac for debugging. There are also a simulator logs folder and the
To free up at least some of this space, you can do the following:
Device Supportfiles are stored in
~/Library/Developer/Xcode/iOS DeviceSupport/. In here you will find folders with names like:
13.4.1 (17E262). Check which iOS version you are still using for debugging and delete any old ones you don’t use anymore.
/Library/Developer/CoreSimulator/Profiles/Runtimeyou can find runtime support files for current or previous iOS versions, delete the version that you don’t use anymore.
- From the
Terminalyou can run
xcrun simctl delete unavailableso Xcode deletes all simulators that are now unavailable because you don’t have the runtime files for that specific iOS version anymore.
- Finally, in
~/Library/Logs/CoreSimulatoryou can find logs for all the Simulators (you can delete everything here).
After doing all of the above I regained around
120GB of disk space on my Mac. This is after a year of use and just two major iOS releases so this can take up a lot of disk space in a very short time.