Having slipped down the rabbit hole of attempting to install every application onto my mac using terminal via Homebrew or mas, I am now faced with the question of how do I update all of those applications via brew?
Solution
brew update && brew list --casks | xargs brew install --cask && brew cleanupsource derived from:
Update all packages installed with homebrew
Update all packages installed with homebrew · GitHub
gist.github.com
Caveat
Some packages cause this process to error. For example,
Error: onedrive: Unsatisfied requirements failed this build.
or
Error: Cask 'autodesk-fusion360' is not installed.
Fusion360 regularly throws this error, the process stops and... therefore the command is not fully executed, not all applications get examined for update and the all important brew cleanup is skipped.
Solution
It is possible to exclude specific packages from examination with grep -v 'package'
brew update && brew list --casks | grep -v 'autodesk-fusion360' | xargs brew upgrade --cask && brew cleanupUsual disclaimer, execute this code at your own risk, I do not accept any responsibility for damage or inconvenience caused by executing any of this code in your environment