Create a gist now

Instantly share code, notes, and snippets.

Brew command for total updating all your installed packages including casks
#!/usr/bin/env zsh
# Put it to /usr/local/bin/brew-total and use as `brew total`
brew update && brew upgrade --all && brew cleanup
brew cask list | xargs brew cask install && brew cask cleanup
caskroom=/opt/homebrew-cask/Caskroom
for cask in $caskroom/*
do
candidates=($cask/*(om[2,$]))
[[ -z $candidates ]] || rm -rf $candidates
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment