Failing to permanently delete old simulator volumes

Hello all,

Yesterday, I found out that there's 60GB's of old simulator volumes on my mac in /Library/Developer/CoreSimulator/Volumes/. When I try to delete those through Xcode Settings -> Components under Other Installed Platforms, it looks like they are deleted, but after restarting my Mac, they simply return.

I tried the solution proposed here (which is to delete the dmg files in /Library/Developer/CoreSimulator/Images/), but in my case, there are no dmg files in there. So it looks like they were properly deleted, unlike those in /Library/Developer/CoreSimulator/Volumes/.

I could obviously try to delete the dmg files in /Library/Developer/CoreSimulator/Volumes/, but that doesn't work according to a post on reddit that I'm not allowed to show here (It's called 'Deleted 240GB of Xcode simulators multiple times but they keep remounting - how do I permanently remove them?') And I wonder if it's a safe thing to do.

Do you have any suggestions for how to remove the old volumes correctly and permanently?

Answered by lionelng in 897497022

Open terminal and check:

To list unavailable simulators: xcrun simctl list devices unavailable

To delete them: xcrun simctl delete unavailable

Open terminal and check:

To list unavailable simulators: xcrun simctl list devices unavailable

To delete them: xcrun simctl delete unavailable

Thank you for your reaction, lionel.

'xcrun simctl list devices unavailable' correctly lists the unavailable devices. However, as shown on the screenshot below, 'sudo xcrun simctl delete unavailable' does not delete them, since they are still there when I run 'xcrun simctl list devices unavailable' afterwards.

I decided to run the delete command with the --verbose flag. You can see the result below. There aren't any errors, but I noticed that at the 10th line or so it says 'PATH = /opt/homebrew/...'

Does anyone know if homebrew could be the cause or have any other suggestions as to how I could solve this?

What if you run the delete command without sudo? If simulators are per-user, I'd imagine that'd be a problem since root probably does not own the simulators you are looking at.

Failing to permanently delete old simulator volumes
 
 
Q