Homebrew

🛠Tool

brew (command line tools)

See which packages you have:

brew list

See which packages are available:

brew search

Get more info about the node package:

brew info node

See which packages have updates available:

brew outdated

brew cleanup

Dry-run of what would be deleted (really delete without -n):

brew cleanup -n

Update

Great overview of commands

Pin (prevent from upgrading)

Don’t include a certain application when running brew upgrade:

brew pin mysql

Include it again:

brew unpin mysql

brew services

brew services start postgresql is a wrapper for launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

  • List services which run at startup:

    brew services list
  • To get instructions on how to use brew services:

    brew services help

brew casks (UI applications)

Update all Homebrew Casks

brew update
brew cask list | xargs brew cask install --force

To install a specific app called <MY_APP>:

brew update
brew cask uninstall <MY_APP> && brew cask install <MY_APP>

Issues

php version

When facing this issue

Failed loading /usr/local/opt/php@7.0/lib/php/20151012/opcache.so: dlopen(/usr/local/opt/php@7.0/lib/php/20151012/opcache.so, 9): image not found

the following helped:

rm -rf /usr/local/etc/php/7.0/
brew uninstall php@7.0 && brew install php@7.0

Discuss on TwitterImprove this article: Edit on GitHub

Discussion


Explain Programming

André Kovac builds products, creates software, teaches coding, communicates science and speaks at events.