Skip to content

Instantly share code, notes, and snippets.

@voldmar
Last active March 25, 2016 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voldmar/a861e7c51b7e77ab9233 to your computer and use it in GitHub Desktop.
Save voldmar/a861e7c51b7e77ab9233 to your computer and use it in GitHub Desktop.
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