Brew / Brew Cask Cheatsheet

Basic Command Comparison

Example usage:
  brew search [TEXT|/REGEX/]
  brew info [FORMULA...]
  brew install FORMULA...
  brew update
  brew upgrade [FORMULA...]
  brew uninstall FORMULA...
  brew list [FORMULA...]

Troubleshooting:
  brew config
  brew doctor
  brew install --verbose --debug FORMULA

Contributing:
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]

Further help:
  brew commands
  brew help [COMMAND]
  man brew
  https://docs.brew.sh

Brew Update vs Upgrade

The “update” updates Homebrew itself, where as “upgrade” updates the installed packages.

$ brew update            # update the formulae and Homebrew itself
$ brew outdated          #  what is outdated
$ brew upgrade           # Upgrade everything
$ brew upgrade <formula> # Or upgrade a specific formula

HomeBrew Casks

Homebrew-Cask is an extension built on top of HomeBrew which speeds up the installation process of large binary files with the use of the Terminal App. Applications such as Google Chrome, Firefox, Alfred, and Docker can be easily installed without having to download the .dmg file.

Fixing the pesky ‘depends_on macos’ value: “:lion”

Catlina Upgrade

Unsurprisingly brew is broken by the upgrade and the effects of trying to force zsh as the default shell need to be seen.

Steps taken post Catlina upgrade

$ brew doctor   # report git missing and other issues
$ brew update   # update brew, to fix git warning
$ brew upgrade  # upgrade just to be safe

$ brew doctor # now complains of missing xcode and ``sbin`` not being in your path.
$ xcode-select --install
$ echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
$ brew doctor # still report missing ``sbin`` need to exist and open a new terminal

$ brew doctor       # reports clean
$ brew cask list    # good my casks are still there
$ brew cask upgrade # nothing to be upgraded.