KingTim
KingTim

Reputation: 1301

Is it normal for Xcode/Simulator to take up 15gb of space?

I got a disk almost full warning so I ran DaisyDisk.. Apparently Xcode is taking up 15gb of space:

https://i.sstatic.net/JRR9M.jpg

iOS device support is 12.3 gb:

https://i.sstatic.net/Z8O6L.jpg

I don't know if this is normal or not, I've never noticed Xcode/simulator taking this much space. Do I need all the different iOS versions on there? What steps can I take to free up some room?

Upvotes: 5

Views: 5692

Answers (2)

russbishop
russbishop

Reputation: 17229

There are a couple of things you can do to free up space though.

Make sure Xcode and Simulator.app are closed before starting.

Xcode downloads symbols, etc to ~/Library/Developer/Xcode/<platform> DeviceSupport/<version>. If you no longer develop with older versions listed there you can delete the associated folders. The platforms are iOS, watchOS, and tvOS. This can be up to 5 GB in some cases. Don't delete the folder for the OS version(s) your test devices are using though or you'll have to wait for Xcode to re-download that data next time you try to run.

You can also delete ~/Library/Developer/Xcode/DerivedData. Every project you build creates artifacts here; you may have folders for old projects you haven't opened in a long time. This might free up 2-5 GB depending on how many projects you've built over time.

If you have actual Simulator devices taking up lots of space, there are several ways to clean them up. (I used to average 5-15 GB of data just in Simulator devices).

  1. You can click & hold on app icons in the Simulator and delete specific apps. This may help if you have an app that downloads a lot of data.
  2. You can reset the device itself using xcrun simctl erase. Only do this if you don't have a lot of custom data loaded in that Simulator.
  3. If you have devices associated with older runtimes you no longer have you can run xcrun simctl delete unavailable.

Upvotes: 9

Jeremy Huddleston Sequoia
Jeremy Huddleston Sequoia

Reputation: 23651

Yes, there are THREE complete operating systems shipped in there, for the iOS, tvOS, and watchOS Simulators. That is the expected size. Note that HFS+ Compression is used, so that helps with some of the disk usage.

Upvotes: 0

Related Questions