Skip to content

Instantly share code, notes, and snippets.

@amleszk
Created March 20, 2019 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amleszk/01286cbc06872b501ec5e05740b8f91d to your computer and use it in GitHub Desktop.
Save amleszk/01286cbc06872b501ec5e05740b8f91d to your computer and use it in GitHub Desktop.
Delete simulators by identifier from simctl
#!/bin/bash
# Delete by finding round bracket #2
xcrun simctl list | cut -d "(" -f2 | cut -d ")" -f1 | grep -E ".+-.+-.+-.+" | grep -v "^com" | xargs xcrun simctl delete
# Delete by finding round bracket #3
xcrun simctl list | cut -d "(" -f3 | cut -d ")" -f1 | grep -E ".+-.+-.+-.+" | grep -v "^com" | xargs xcrun simctl delete
# Delete by finding round bracket #4
xcrun simctl list | cut -d "(" -f4 | cut -d ")" -f1 | grep -E ".+-.+-.+-.+" | grep -v "^com" | xargs xcrun simctl delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment