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 && brew cask 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
  8. Remove installers for brew cask apps (to release disk space): brew cask cleanup
Created: Thu, 19 Oct 2017 00:00:00 +0530
Category: Tutorials
Tags: Automation, Brew, Mac OS

Comments