osascript -e 'tell application "iOS Simulator" to quit' | |
osascript -e 'tell application "Simulator" to quit' | |
xcrun simctl erase all |
This comment has been minimized.
This comment has been minimized.
Nice. I couldn’t figure out how to do it because I have not the shell fu. |
This comment has been minimized.
This comment has been minimized.
RileyMills
commented
Oct 7, 2014
Man, I just spent an hour or two putting something like this together. This is so much simpler. |
This comment has been minimized.
This comment has been minimized.
mattneub
commented
Jan 28, 2015
sixstringtheory I'd like to quote this in my book; may I? |
This comment has been minimized.
This comment has been minimized.
ArtSabintsev
commented
Jan 29, 2015
This is awesome - thanks, @ZevEisenberg and @sixstringtheory |
This comment has been minimized.
This comment has been minimized.
vittoriom
commented
Aug 20, 2015
I think it would be even better to pipe another grep like |
This comment has been minimized.
This comment has been minimized.
capnslipp
commented
Oct 21, 2015
That's so f'ing handy. About the only way I can think of improving this is to make a wrapper So… much cheers. |
This comment has been minimized.
This comment has been minimized.
Blackjacx
commented
Nov 10, 2015
Since Xcode 7 it is possible to do |
This comment has been minimized.
This comment has been minimized.
Thanks, @Blackjacx! Updated with the new first-party method of doing this. |
This comment has been minimized.
This comment has been minimized.
stanislaw
commented
Aug 26, 2016
Very useful, thanks! |
This comment has been minimized.
This comment has been minimized.
jeanmw
commented
May 16, 2017
Yay, thanks so much this is super useful/convenient for testing! |
This comment has been minimized.
This comment has been minimized.
neilt
commented
Sep 25, 2017
In Xcode 9, you can use |
This comment has been minimized.
This comment has been minimized.
SupriyaKalghatgi
commented
Nov 13, 2017
Thank you so much |
This comment has been minimized.
This comment has been minimized.
sampurcell93
commented
Dec 20, 2017
the amount of disk this freed up is astounding, thanks |
This comment has been minimized.
This comment has been minimized.
armcknight
commented
May 15, 2018
hah, just found this again! like the updated version, so much cleaner! |
This comment has been minimized.
This comment has been minimized.
consbulaquena
commented
Jul 25, 2018
I thought there was a problem with the database, turns out the simulator only needs resetting! xcrun simctl erase all |
This comment has been minimized.
This comment has been minimized.
CyberToro
commented
Nov 30, 2018
This is amazing! Thanks a lot! |
This comment has been minimized.
armcknight commentedSep 27, 2014
pretty good, but what about this one liner without the variable:
xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl erase "{}"
?