Ramblings of a Coder's Mind

Got Tech? Will Hack.

Upgrade everything in brew

Homebrew is a the missing package manager for Mac OS. Brew cask extends Homebrew and brings its elegance, simplicity, and speed to Mac OS applications and large binaries alike.

If you’re using these tools and would like to upgrade all of the applications you have, run the following command.

brew update && brew upgrade && (brew cask outdated | cut -f 1 -d " " | xargs brew cask reinstall) && brew cleanup

Breaking it down

  1. Update brew with information from the latest taps: brew update
  2. Upgrade apps in brew: brew upgrade
  3. Update brew cask apps: brew cask outdated | cut -f 1 -d " " | xargs brew cask reinstall
  4. Find outdated cask apps: brew cask outdated
  5. Cut out the app names: cut -f 1 -d " "
  6. Upgrade brew cask apps: xargs brew cask reinstall
  7. Remove installers for brew apps (to release disk space): brew cleanup

Note: brew cask cleanup is now deprecated.

Created: 19th October 2017
Category: Tutorials
Tags: Automation, Brew, Mac OS

Comments