Skip to content

Instantly share code, notes, and snippets.

@stak
Created May 24, 2016 06:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stak/0c33d8f54ad31e0cf4d7ec0c11fbdec2 to your computer and use it in GitHub Desktop.
Save stak/0c33d8f54ad31e0cf4d7ec0c11fbdec2 to your computer and use it in GitHub Desktop.
Remove Android Studio and all related files completely on OSX.
#!/bin/bash
function confirm {
MSG=$1
while :
do
echo -n "${MSG} [Y/N]: "
read ans
case $ans in
[yY]) return 0 ;;
[nN]) return 1 ;;
esac
done
}
confirm "Remove Android Studio and all related files. OK?"
if [ $? = 0 ]; then
rm -Rfv /Applications/Android\ Studio.app
rm -Rfv ~/Library/Preferences/AndroidStudio*
rm -Rfv ~/Library/Application\ Support/AndroidStudio*
rm -Rfv ~/Library/Logs/AndroidStudio*
rm -Rfv ~/Library/Caches/AndroidStudio*
rm -Rfv ~/Library/Android
rm -Rfv ~/.gradle
rm -Rfv ~/.android
rm -v ~/Library/Preferences/com.google.android.studio.plist 2> /dev/null
echo "Done."
else
echo "Aborted."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment