Brew

1 minute read

In this post, I list some of the important Brew commands

Global commands

brew outdated  # shows outdated packages
brew doctor	 # Diagnose brew issues
brew update     # update brew and cask
brew upgrade     # update all outdated packages
brew list	# List installed
brew outdated	# What’s due for upgrades?
brew deps --tree --installed  # Display the dependency tree

Installing a particular version of a package

All the cask files are located at /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks

Open the one you want to chagne and modify the “version” ans “sha256”

Uninstall the unwanted package and install again

Package commands

brew install git	# Install a package
brew uninstall git	# Remove/Uninstall a package
brew upgrade git	# Upgrade a package
brew unlink git 	# Unlink
brew link git	# Link
brew switch git 2.5.0	# Change versions
brew list --versions git	# See what versions you have
brew info git	# List versions, caveats, etc
brew cleanup git	# Remove old versions
brew edit git	# Edit this formula
brew cat git	# Print this formula
brew home git	# Open homepage
brew search git	# Search for formulas

Bew cask commands

brew install --cask virtualbox # cask install package
brew uninstall --cask virtualbox # cask uninstall package

Source: https://devhints.io/homebrew

Tags:

Categories:

Updated:

Comments