Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

http://imgur.com/a/cTIZZ

iOS device support is 12.3 gb:

http://imgur.com/a/IcE5X

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?

like image 828
KingTim Avatar asked Jan 04 '23 10:01

KingTim


1 Answers

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.
like image 83
russbishop Avatar answered Jan 19 '23 10:01

russbishop