Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shutdown and erase all Xcode simulators then re-open your default preference so it's ready to go.
echo "Shutting down all devices..."
$(xcrun simctl shutdown all)
echo "Erasing all devices..."
$(xcrun simctl erase all)
echo "Quitting"
$(osascript -e 'quit app "Simulator"')
echo "Re-opening your default simulator..."
# xcrun simctl list devices to get a list
$(xcrun simctl boot 4BB9C625-F60B-4A44-9AEC-F1E6B0FE1CED)
$(open -a
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment