How to uninstall downloaded Xcode simulator?

IosXcodeIos Simulator

Ios Problem Overview


How to uninstall one of the downloaded Xcode simulators?

My iOS 7 Simulator won't boot (Unable to boot the iOS Simulator). I want to completely reinstall it.

enter image description here

I tried:

  • Deleting ~/Library/Caches/com.apple.dt.Xcode
  • Deleting Xcode and downloading it again from the App Store.

But the iOS 7.1 Simulator remains installed. How to remove it?


Note that I also tried:

  • Resetting the simulator content and settings.
  • Deleting the simulator device and creating it again.

and it didn't fix my problem.

Ios Solutions


Solution 1 - Ios

You can remove them from /Library/Developer/CoreSimulator/Profiles/Runtimes (Not ~/Library!):

screenshot

Solution 2 - Ios

NOTE: This will only remove a device configuration from the Xcode devices list. To remove the simulator files from your hard drive see the previous answer.

For Xcode 7 just use Window \ Devices menu in Xcode:

Devices menu

Then select emulator to delete in the list on the left side and right click on it. Here is Delete option: enter image description here

That's all.

Solution 3 - Ios

Run this command in terminal to remove simulators that can't be accessed from the current version of Xcode in use.

xcrun simctl delete unavailable

Also if you're looking to reclaim simulator related space Michael Tsai found that deleting sim logs saved him 30 GB.

~/Library/Logs/CoreSimulator

Solution 4 - Ios

Slightly off topic but could be very useful as it could be the basis for other tasks you might want to do with simulators.

I like to keep my simulator list to a minimum, and since there is no multi-select in the "Devices and Simulators" it is a pain to delete them all.

So I boot all the sims that I want to use then, remove all the simulators that I don't have booted.

Delete all the shutdown simulators:

xcrun simctl list | grep -w "Shutdown"  | grep -o "([-A-Z0-9]*)" | sed 's/[\(\)]//g' | xargs -I uuid xcrun simctl delete  uuid

If you need individual simulators back, just add them back to the list in "Devices and Simulators" with the plus button.

[![enter image description here][1]][1] [1]: https://i.stack.imgur.com/PMuMP.png

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRicardo Sanchez-SaezView Question on Stackoverflow
Solution 1 - IosNimit ParekhView Answer on Stackoverflow
Solution 2 - IosCTiPKAView Answer on Stackoverflow
Solution 3 - IosSteve MoserView Answer on Stackoverflow
Solution 4 - IospossenView Answer on Stackoverflow