I have always upgraded my installed homebrew packages whenever updates became available. Recently however, I ran into a situation where I did not want to upgrade a specific package while also upgrading the rest. Loved how incredibly easy Homebrew made this.
Upgrade all except pinned
Fetch the newest version of Homebrew and all formulae.
Now we can show formulae that have an updated version available. Pin the package that you do not want to upgrade. Once a package is pinned it will be ignored in upgrades. In order to make it eligible for upgrades again, unpin it. Note: You can run the
brew unpin commands at any time.
brew outdated brew pin <package> brew upgrade
brew update brew outdated brew upgrade <package>
brew update brew upgrade