5

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

https://i.stack.imgur.com/JRR9M.jpg

iOS device support is 12.3 gb:

https://i.stack.imgur.com/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?

2
  • "What steps can I take to free up some room" For questions about how to use your computer, see SuperUser or AskDifferent. If 15GB is problematic for you, your computer is already in serious trouble for other reasons.
    – matt
    Mar 5, 2017 at 2:07
  • My laptop only has 128gb of space by default, so I've definitely had to be careful with how much room I take up. I clean it up as much as possible whenever I can, which is why I'm trying to minimize the amount of space Simulator and Xcode take up.
    – KingTim
    Mar 6, 2017 at 15:27

2 Answers 2

9

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.
1
  • Thanks! I'll try this - I did already reset content and settings in my simulator, but I don't think it's the apps themselves taking up room, they're all small practice projects. It looks like it's just the OS versions doing the damage.
    – KingTim
    Mar 6, 2017 at 15:29
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.