Skip to content

Instantly share code, notes, and snippets.

@lotharschulz
Last active February 20, 2023 11:21
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
###################################
# BREW uninstall script for osx_bootstrap.sh script
###################################
SUDO_USER=$(whoami)
brew uninstall coreutils
brew uninstall gnu-sed
brew uninstall gnu-tar
brew uninstall gnu-indent
brew uninstall gnu-which
echo "uninstall gnu tools"
brew uninstall findutils
echo "uninstall java"
# https://github.com/AdoptOpenJDK/homebrew-openjdk
brew uninstall --cask adoptopenjdk
brew uninstall --cask adoptopenjdk8
brew uninstall --cask adoptopenjdk11
brew uninstall --cask adoptopenjdk14
brew uninstall --cask adoptopenjdk15
PACKAGES=(
alfred
asciinema
bash
ack
autoconf
automake
autojump
aws-iam-authenticator
ffmpeg
fx
gcc
gettext
gifsicle
git
graphviz
gradle
grpc
golang
gnupg
hub
httpie
hyperkit
kotlin
kubernetes-cli
kubernetes-helm
maven
imagemagick
jq
jpegoptim
libjpeg
libmemcached
lynx
make
markdown
memcached
mercurial
minikube
netron
nmap
npm
nvm
node
optipng
pkg-config
postgresql
python
python3
pypy
rabbitmq
ripgrep
rename
ssh-copy-id
tig
terminal-notifier
tesseract
the_silver_searcher
tmux
tree
yamllint
vim
watch
wget
)
echo "Installing packages..."
brew uninstall ${PACKAGES[@]}
CASKS=(
android-studio
chromium
firefox
gimp
google-chrome
intellij-idea-ce
keepingyouawake
miro
protopie
rectangle
slack
telegram
thunderbird
vagrant
visual-studio-code
vlc
zoom
)
echo "Installing cask apps..."
sudo -u $SUDO_USER brew uninstall --cask ${CASKS[@]}
#sudo -u $SUDO_USER brew uninstall --cask docker
#or
#brew uninstall colima
echo "Cleaning up..."
brew cleanup
echo "brew update"
brew update
echo "brew upgrade"
brew upgrade
echo "brew doctor"
brew doctor
# please see also the accompanying blog post
# https://www.lotharschulz.info/2021/05/11/macos-setup-automation-with-homebrew/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment