How to delete iOS simulator runtimes?

There are multiple iOS simulator runtimes located at /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime which I don't need. I tried the following approaches to delete them but not working.

  1. Xcode > Settings > Components > Delete (It can delete some but not all of them)
  2. xcrun simctl runtime list (It doesn't show the old runtimes)
  3. sudo rm (Operation not permitted)
sudo rm -rf cc1f035290d244fca4f74d9d243fcd02d2876c27.asset
Password:
rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/AssetData/096-69246-684.dmg: Operation not permitted
rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/AssetData: Operation not permitted
rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/Info.plist: Operation not permitted
rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/version.plist: Operation not permitted
rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset: Operation not permitted

I have two questions:

  1. Why "xcrun simctl runtime list" is unable to list some old runtimes?
  2. How to delete them?
Answered by revoceci in 873445022

Same experience here, there seems to be a bug that is leaving leftover runtimes under AssetsV2 folder. The folder is SIP-protected (or similar) so there is no chance to use sudo rm command to clean it up

EDIT: seems like this thread explains the exact issue in detail: https://developer.apple.com/forums/thread/812992?page=1#873453022

Same experience here, there seems to be a bug that is leaving leftover runtimes under AssetsV2 folder. The folder is SIP-protected (or similar) so there is no chance to use sudo rm command to clean it up

EDIT: seems like this thread explains the exact issue in detail: https://developer.apple.com/forums/thread/812992?page=1#873453022

If anyone is still looking for solution all you have to do is literally just delete it using xcode in the components tab. Click on the question mark circle icon and then click delete.

I think you’ve misunderstood the point of this thread. When everything is working correctly you can indeed delete simulator runtimes using Xcode > Settings > Components. The issue that jamesic and revoceci have encountered indicates that things are not working correctly.

The thread that revoceci referenced is where we’ve been discussing this issue in more depth.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to delete iOS simulator runtimes?
 
 
Q