Skip to content

Instantly share code, notes, and snippets.

@penso
Last active December 13, 2020 14:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penso/6a78b64d665d87776d384d39353ba6a0 to your computer and use it in GitHub Desktop.
Save penso/6a78b64d665d87776d384d39353ba6a0 to your computer and use it in GitHub Desktop.
ChromeIsBad.sh
#!/bin/sh
# Based on Loren finding https://chromeisbad.com/
# From https://apple.stackexchange.com/questions/92640/how-do-i-prevent-the-permissions-denied-message-from-being-displayed-when-i-do-a
find() {
{ LC_ALL=C command find -x "$@" 3>&2 2>&1 1>&3 | \
grep -v -e 'Permission denied' -e 'Operation not permitted' >&3; \
[ $? = 1 ]; \
} 3>&2 2>&1
}
echo "Deleting Chrome"
sudo rm -rfv /Applications/Google\ Chrome.app
echo "Deleting Google, Chrome and Keystone related files"
for directory in ~/Library /Library
do
find $directory -name "Google" -type d -maxdepth 2 -exec sudo rm -rfv {} \;
find $directory -name "com.google.keystone*" -maxdepth 2 -exec sudo rm -rfv {} \;
find $directory -name "com.google.Keystone*" -maxdepth 2 -exec sudo rm -rfv {} \;
find $directory -name "com.google.Chrome*" -maxdepth 2 -exec sudo rm -rfv {} \;
done
@penso
Copy link
Author

penso commented Dec 12, 2020

Read https://chromeisbad.com/ for more info. Use this script at your own risk!

@supermarin
Copy link

sudo rm -rfv {} to print the paths being deleted

@penso
Copy link
Author

penso commented Dec 13, 2020

@supermarin good idea, I updated it

@olberger
Copy link

AFAIU, this only regards MacOS users, right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment