How to update all Homebrew packages on your Mac
Updated · by Nico Wickersheim
Keeping your Homebrew packages current gets you security fixes and new features, but Homebrew splits the job into two commands with confusingly similar names. Here's what each one does and how to upgrade everything, or just the packages you choose.
brew update vs. brew upgrade
brew updaterefreshes Homebrew itself and its list of available package versions. It doesn't change any software you have installed.brew upgradeactually installs the newer versions of your installed formulae and casks.
You rarely need to run brew update by hand: Homebrew updates itself automatically before brew install and brew upgrade if it hasn't done so recently.
See what's outdated
brew updatebrew outdatedThis lists every installed package with a newer version available, showing the installed and the latest version side by side.
Upgrade everything
brew upgradeWithout arguments, brew upgrade upgrades all outdated formulae and casks in one go. Afterwards Homebrew removes the old versions of what it just upgraded.
Upgrade single packages
brew upgrade wgetbrew upgrade --cask firefoxPass one or more package names to upgrade only those. Use --cask when a formula and a cask share the same name.
Include apps that update themselves
Many Mac apps such as browsers have their own updater. Their casks are marked as auto-updating, and brew upgrade skips them by default, as it does casks without a fixed version. To upgrade those too, add --greedy:
brew outdated --cask --greedybrew upgrade --cask --greedy--greedy-auto-updates and --greedy-latest narrow this down to only one of the two groups.
Keep a formula on its current version
If an upgrade would break your project, pin the formula. Pinned formulae are skipped by brew upgrade until you unpin them:
brew pin nodebrew list --pinnedbrew unpin nodeFree up the space afterwards
Upgrades leave downloads behind in Homebrew's cache. Our guide to brew cleanup shows how to reclaim that space.