-
-
Save mehdiamiri9/d4fdf2bec9c572f726b90e658d50cffd to your computer and use it in GitHub Desktop.
Remove Android Studio and all related files completely on OSX.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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