Skip to content

Instantly share code, notes, and snippets.

@albertodebortoli
Created March 30, 2015 08:40
Show Gist options
  • Save albertodebortoli/a9c3d4c76121f5b0677d to your computer and use it in GitHub Desktop.
Save albertodebortoli/a9c3d4c76121f5b0677d to your computer and use it in GitHub Desktop.
Reset all iOS simulators
if pgrep "iOS Simulator"; then
killall "iOS Simulator"
fi
if pgrep "Xcode"; then
killall "Xcode"
fi
xcrun simctl list | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$' | xargs -I uuid xcrun simctl erase uuid | true
echo $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment