276

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.

Steve Moser
  • 7,647
  • 5
  • 55
  • 94
Ricardo Sanchez-Saez
  • 9,466
  • 8
  • 53
  • 92

4 Answers4

638

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

screenshot

Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
Nimit Parekh
  • 16,776
  • 8
  • 50
  • 72
  • 1
    Yeah, this allowed me to delete and reinstall the simulator runtime, so thanks for that. Unfortunately it didn't fix my problem, I still get the `Unable to boot the iOS Simulator` message when trying to launch the 7.1 one. – Ricardo Sanchez-Saez Jun 19 '15 at 14:38
  • duplicate: https://stackoverflow.com/questions/29076171/how-to-force-reinstall-ios-simulator/29080441#29080441 – adrum Dec 08 '15 at 22:45
  • Your answer is useful. But my problem is that Xcode 7.x tells me I installed iOS 8.3, however, there is no 8.3 in `/Library/Developer/CoreSimulator/Profiles/Runtimes/`. Could you tell me how to repair it? – DawnSong Mar 22 '16 at 04:54
  • 1
    @DawnSong You need to first of delete those unuseful simulator remove and download simulator .dmg from https://developer.apple.com/downloads/ – Nimit Parekh Mar 22 '16 at 05:07
  • 9
    I don't have Profiles folder. I use Xcode 7.1. Is something wrong with me? :) – kiedysktos Apr 05 '16 at 07:39
  • 31
    @kiedysktos Look in /Library, not ~/Library – Nimit Parekh Apr 05 '16 at 08:11
  • 3
    in /Library I don't have Developer folder, and in ~/Library/Developer/CoreSimulator there is no Profiles. But anyway my issues with simulator were solved by simple system restart – kiedysktos Apr 06 '16 at 06:06
  • 1
    If you do not see the Profiles folder: http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/ – Bobby Sep 28 '16 at 07:59
  • I do not have a directory `/Library/Developer/CoreSimulator/Profiles/Runtimes/`, but I do have some significantly large folders in `Xcode-App-Bundle/Contents/Developer/Platforms`, that look like they could be the simulator runtimes. Their names end in `.platform` though, not `.simruntime`. Maybe Apple has moved where the files are? (I am running Xcode beta 8.3, I do not know for how long this would have been like this) – GeF Feb 26 '17 at 10:34
  • 9
    Folder doesn't exists on MacOS 11.3 and xCode 9.4 – Peter Cullen Jun 28 '18 at 22:49
  • @PeterCullen, yup, seems they have changed it :-( --- if anyone knows please feel free to update the answer. – Suhaib Jul 01 '18 at 19:31
  • 2
    My list of simulators showed nothing, no simulators, just "Generic iOS Device". I deleted everything from the /Runtimes path as suggested and freed up over 20GB of space on disk. Then ran `xcrun simctl delete unavailable`. Now all my simulators repopulated in the "Devices & Simulators -> Simulators tab as well as the simulators list at the Run button. It seems that the iOS 12 simulators are hiding elsewhere as a `Run` will start a simulator but the simulator still never fully boots... back to original problem: "Failed to initiate service connection to simulator" – Cerniuk Aug 26 '18 at 11:19
  • it works on Xcode 9.4. – Jeff Bootsholz Sep 02 '18 at 07:26
110

NOTE: This will only remove a device configuration from the Xcode devices list. To remove the simulator files from your hard drive see this 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.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
CTiPKA
  • 2,944
  • 1
  • 24
  • 27
  • 2
    finally a sane solution! – Stefan Fisk Nov 13 '15 at 20:27
  • 34
    This will only remove a device configuration. The question was about removing a simulator (which has devices associated to it.) To remove the simulator as a whole, the version runtime needs to be removed. Xcode will remove the devices automatically on next app start for the removed runtime. See the answer from @NimitParekh above for way to do this. – Neil Monroe Jan 15 '16 at 17:00
  • 12
    What you do is just the simulator device, which are located in `~/Library/Developer/CoreSimulator/Devices/`, and can be recreated as you said with almost no effort. However, any iOS simulator runtime is sizable, for example, 1.49G, which is located in `/Library/Developer/CoreSimulator/Profiles/Runtimes`. – DawnSong Mar 22 '16 at 05:00
  • 13
    This is wrong ... it's a configuration, not the simulator .. – daisy Aug 31 '16 at 03:43
  • 2
    @CTiPKA solution worked only partially for me (simulators disappeared from Xcode, but the app size itself stayed the same). In order permanently delete them just run `xcrun simctl delete unavailable` – Bartosz Kunat Feb 27 '19 at 15:26
96

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
Steve Moser
  • 7,647
  • 5
  • 55
  • 94
  • This is at least a command to run after removing simulators as simulator configuration won't be deleted on the filesystem after deleting them in xcode – brainray Jun 10 '17 at 16:03
  • 1
    Before do this, remove unused Runtimes file here: `/Library/Developer/CoreSimulator/Profiles/Runtimes`. Then run your command (`xcrun simctl delete unavailable`), it will delete the simulators that we just deleted their runtime – huynguyen Jul 04 '19 at 08:08
  • You should also remove deleted simulators from the file ~/Library/Developer/CoreSimulator/Devices/device_set.plist. – vmeyer Nov 15 '19 at 09:57
  • `xcrun simctl delete unavailable` returns `xcrun: error: unable to find utility "simctl", not a developer tool or in PATH` (macOS Catalina 10.15.7) I've found all simulator related files in `/Applications/Xcode.app/Contents/Developer/Platforms` and deleted the content of that directory – Sebastian Hagens Dec 03 '20 at 13:51
51

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

philipp
  • 4,133
  • 1
  • 36
  • 35
possen
  • 8,596
  • 2
  • 39
  • 48