-2

How do I manage and delete simulators in Xcode 14? I don't need a simulator for every minor version of iOS, they're just wasting space on my disk. I used to be able to delete these from Xcode, but it seems they removed this ability. Or did they move it somewhere that I am not seeing? I found all the files on my hard drive, but I don't want to start deleting individual files because it seems like there are multiple files for each simulator in different places.

** Update: Practically every responses so far has explained how to do it in versions earlier than 14. I know how to do this in older versions of Xcode, it has always been easy. They have changed it in version 14 and there is no obvious way to do it any more. Please make sure you are referring to version 14 in your responses **

Ray
  • 187
  • 1
  • 7
  • You can manage (list, delete, ...) simulators from the command line with "xcrun simctl". See for example https://stackoverflow.com/q/10834817/1187415. – Martin R Dec 21 '22 at 15:27
  • That's from 10 years ago. None of this is relevant anymore. – Ray Dec 22 '22 at 03:52
  • 2
    @Ray Consider the possibility that you may be wrong. Simulator management is nowise different in Xcode 14 than, say, Xcode 13, and `xcrun simctl` is still relevant (I use it every day). – matt Dec 22 '22 at 04:07
  • @Ray: Xcode 14 still has a “Devices and Simulators” window where you can delete simulators. Which method exactly are you referring to that existed in earlier versions, but not in Xcode 14? – Martin R Dec 22 '22 at 05:39
  • @MartinR Devices and Simulators doesn't show all the simulators anymore. Am I missing something? I have many simulators installed, but none are shown in that screen. – Ray Dec 22 '22 at 14:57
  • @matt Thanks, I was looking in the wrong spot, I was able to get that working now. – Ray Dec 22 '22 at 15:08
  • And what I said in my answer would have completely solved the problem too. But you chose to spit on it instead of trying it. – matt Dec 22 '22 at 17:51
  • Devices and Simulators shows Devices by default. You have to switch to Simulators (as I said in my answer). – matt Dec 22 '22 at 17:53

1 Answers1

0

There is a folder name CoreSimulator which contains all of your current simulators. You can take a look at this path /Users/{your_username}/Library/Developer/CoreSimulator/Devices. And it's safe to delete Devices folder.

In case you want to free your hard disk, try to access this path /Users/{your_username}/Library/Developer/Xcode and then delete the content of these folders:

  • Archives
  • DerivedData
  • iOS DeviceSupport (this one will automatically be generated when a device is connected to your mac)
son
  • 1,058
  • 6
  • 7
  • I wouldn't blindly delete the Archives folder or its contents. You may want to keep around at least some subset of your app archives. Same of "iOS DeviceSupport". If you have a need to symbolicate crash reports you should at least keep device support versions that your app supports. – HangarRash Dec 21 '22 at 01:49
  • You right. However, I'm assuming Ray is running out of hard disk memory, so this is my recommendation. If he needs to analyze the crash report, yeah, he should check before deleting it. – son Dec 21 '22 at 02:09
  • I know that, but there are multiple files and also references to these files in different plist files. I wanted to know if there's an official way to do this, rather than poking around in all these files and possibly breaking something. – Ray Dec 22 '22 at 03:54