Use the command brew upgrade in the terminal to update all of the packages. As for rebuilding all of your programs for the new OS build, there is no reason to do this as the compiled binary should result as the same. If you are noticing any issues, I would just uninstall and reinstall the packages that you are having issues with.

Answer from Nathan Walker on Stack Exchange
🌐
Reddit
reddit.com › r/macos › homebrew users — reminder to update and upgrade (plus other neat things you can do from the command line)
r/MacOS on Reddit: Homebrew users — reminder to update and upgrade (plus other neat things you can do from the command line)
December 10, 2019 -

tl;dr: brew update && brew upgrade

Homebrew is the "missing package manager for macOS (or Linux)". Probably most people don't need it, but it's really helpful for people who like using command line tools, programmers, and Linux fans. I'm not here to persuade anyone to use it, I just want to remind people who do to occasionally update/upgrade. Maybe that's obvious, but I spent an embarrassingly long time forgetting to update.

Here are the two most relevant commands.

  • brew update - Update brew itself and fetches info about what's available for your other software

  • brew upgrade - Upgrade/update everything you've installed with Homebrew

Here are some others.

  • brew list - Display software you've installed

  • brew cask list - Display GUI apps you've installed

  • brew cask upgrade - Update GUI apps you've installed (u/_zio_pane)

  • brew outdated - Display available updates

  • brew upgrade whatever_package - Upgrade only a specific thing

  • brew cleanup - Remove old versions

  • brew leaves - Shows only packages you installed without their dependencies (u/geniuscube)

[That's all this post was going to be, but my original "quick list of neat things to try" below turned into a huge list.]

Here are some random things you can install with Homebrew. (to install any of these, it's brew install whatever)

  • youtube-dl - download video or audio from YouTube - (and a LOT of other sites (u/frozenpandaman))

  • ffmpeg - media transcoder - youtube-dl uses this automatically if the format you want from YouTube isn't directly available

  • tldr - more useful and to-the-point way to get info and example uses for commands (better than digging through 100 pages with man)

  • gnu-typist - fun typing tutor. I used this when I switched from QWERTY to Colemak layout, but someone could have fun with this just to get faster with the regular QWERTY layout.

  • neofetch - shows OS and shell info, you see this a lot in r/unixporn screenshots (by the way, macOS is a real, certified Unix, with BSD heritage)

  • rename - better than mv for batch-renaming files

  • fortune - gives you your fortune for the day/moment

  • cowsay - have a cow say things - fortune | cowsay will let the cow provide your fortune

  • coreutils - the official GNU versions of core utilities like mv, cp, ls, chown, chroot, cat, head, etc, so you can be sure they behave in exactly the same way as on Linux and other systems

  • zsh or fish - better bash-compatible shells with better command completion and history - fish has slightly better completions but also a few annoying breaks from bash syntax. I've used fish for the last 3 years, but after taking that screenshot I think I'm going back to zsh.

  • bash-completion - or you can just make bash itself better with this

  • iterm2 - a better Terminal (GUI app)

  • GUI browsers like firefox and google-chrome

  • links and lynx - text mode browsers

  • kotlin, lua, node, perl, python3, ruby - programming/scripting languages - installing node also gives you npm, the node.js package manager

  • neovim - a slightly better vim (text editor), but you can also just install vim to get a newer version than what ships with macOS

  • flac and opus - media codecs, and mpv - a media player

  • sox - also automatically installs the tool/command play which can play media directly in the terminal, as simple as play song.mp3 or play *.mp3 to play a whole folder, one at a time. It can also synthesize white or pink noise, and apply filters. For example, this is great at blocking speech by mimicking the sound of hundreds of people talking in a coliseum (plus a fountain, maybe), to help you focus:

    play -c 2 -n synth pinknoise mix synth sine amod 0.07 90 band -n 2000 1q vol 0.9

  • -c 2 creates two channels (stereo) (not needed when playing a file that's already stereo)

  • -n synth pinknoise makes it synthesize pink noise

  • mix synth sine amod 0.07 90 makes it slowly cycle loudness between 100% and 90% at a rate of 0.07 cycles per second (a little over 14 seconds for a full cycle)

  • band -n 2000 1q creates a bandpass filter centered at 2khz with a "Q" of one, where lower numbers (like 0.5) make it more relaxed/wider and higher numbers (like 2 or 4) make it tighter

  • vol 0.9 sets the volume to 90%

One more practical example, you can download the audio from rain and fire videos with youtube-dl in a format like mp3 or opus, and then play them both at the same time like this:

# Fire & Wind Storm  
youtube-dl --list-formats "https://www.youtube.com/watch?v=BA0yeSB7s4o"  
youtube-dl -f 251 -x "https://www.youtube.com/watch?v=BA0yeSB7s4o"  
mv Crackling*-BA0yeSB7s4o.opus fire_wind_storm.opus  
  
# Heavy Rain in Car  
youtube-dl --list-formats "https://www.youtube.com/watch?v=DYrvIKpo3fI"  
youtube-dl -f 251 -x "https://www.youtube.com/watch?v=DYrvIKpo3fI"  
mv 10hrs*-DYrvIKpo3fI.opus heavy_rain_in_car.opus  

# Play them together  
play -m fire_wind_storm.opus heavy_rain_in_car.opus
🌐
Homebrew
docs.brew.sh › FAQ
Homebrew Documentation: FAQ (Frequently Asked Questions)
You can fix this by running sudo launchctl config user path "$(brew --prefix)/bin:${PATH}" and then rebooting, as documented in man launchctl. Note that this sets the launchctl PATH for all users. Running a developer command (e.g. brew edit, brew create) enables Homebrew’s developer mode. This means: Homebrew may auto-run brew update before some commands every hour instead of every 24 hours.
Discussions

How do I update a formula with Homebrew? - Stack Overflow
First, update brew's internal list of formulae to the latest: ... Sign up to request clarification or add additional context in comments. ... When I run "brew upgrade ", it actually upgrade all outdated packages, taking hours instead of seconds. That is a very bad design. More on stackoverflow.com
🌐 stackoverflow.com
Using brew update, brew upgrade, and brew cleanup when installing, uninstalling and updating packages
I was told by one guy that it is best to use brew update, brew upgrade and brew cleanup as often as possible. That is, that … … the most safe and clean way to install a package is brew update brew upgrade brew install foo brew cleanup … the most safe and clean way to uninstall a package ... More on talk.macpowerusers.com
🌐 talk.macpowerusers.com
0
3
February 21, 2024
Using brew update, brew upgrade, and brew cleanup when installing, uninstalling and updating packages
Homebrew works best when it is updated often. Personally I run brew upgrade once a day or so to make sure I have all the latest updates of software for security and possibly new features. The brew cleanup isn't needed as often but it won't hurt to run to clean up some old files. More on github.com
🌐 github.com
3
1
February 21, 2024
bash - How to update a list of applications with brew? - Stack Overflow
The original answer and the 2018 update are kept for historical reasons. In the meantime, the command brew cask upgrade has been implemented and can be used instead of brew cask reinstall in the script provided in the original answer. It also works without arguments and upgrades all the casks ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Medium
medium.com › @sumanchapai › updating-homebrew-packages-a17afccd2f34
Updating homebrew packages - Suman Chapai - Medium
January 21, 2024 - After updating brew, you could upgrade your desired package to latest version using brew upgrade yabai (where yabai is to be replaced with package of your choice). Just brew upgrade upgrades all installed packages to latest version.
🌐
DEV Community
dev.to › josephmidura › update-homebrew-on-macos-with-one-script-2lk0
Update Homebrew on macOS With One Script - DEV Community
March 19, 2025 - #!/bin/bash CYAN=$(tput setaf 6) RESET=$(tput sgr0) echo "${CYAN}Updating homebrew and local base of available packages and versions...${RESET}" brew update echo "${CYAN}Upgrading outdated homebrew packages...${RESET}" brew upgrade echo "${CYAN}Cleaning cache of unfinished downloads...${RESET}" brew cleanup echo "${CYAN}Checking for issues...${RESET}" brew doctor
Find elsewhere
🌐
MacPowerUsers
talk.macpowerusers.com › tech support
Using brew update, brew upgrade, and brew cleanup when installing, uninstalling and updating packages - Tech Support - MPU Talk
February 21, 2024 - I was told by one guy that it is best to use brew update, brew upgrade and brew cleanup as often as possible. That is, that … … the most safe and clean way to install a package is brew update brew upgrade brew install foo brew cleanup … the most safe and clean way to uninstall a package is brew update brew upgrade brew uninstall --ignore-dependencies foo brew cleanup and the most safe and clean way to update a package is brew update brew upgrade foo brew cleanup Is it really so?
🌐
GitHub
gist.github.com › mikker › 631106 › 450eda28aefff81091be4812a6b2c4396291f3fd
Update all packages installed with homebrew · GitHub
Update all packages installed with homebrew. GitHub Gist: instantly share code, notes, and snippets.
🌐
GitHub
gist.github.com › flaxel › 8f2b17e39fab3a1d31fef09e2416a7fb
Update all homebrew formulae · GitHub
May 16, 2026 - Update all homebrew formulae. GitHub Gist: instantly share code, notes, and snippets.
🌐
Nickjvturner
nickjvturner.com › posts › upgrade-all-your-brew-packages
Upgrade ALL your Brew packages
September 10, 2023 - brew update && brew list --casks | grep -v 'autodesk-fusion360' | xargs brew upgrade --cask && brew cleanup
Top answer
1 of 2
114

2023 update

Running brew update is not needed any more since Homebrew version 3.0 or so. When it needs fresh information about packages, Homebrew runs brew update --auto-update and caches the information for about 10 minutes.

The commands to run now are:

brew outdated
brew upgrade
brew cleanup

Read below about the meaning and usage of brew outdated and brew upgrade.

brew outdated is not really needed but it helps you to have an overview of what needs to be upgraded, before doing the actual upgrade. You can decide to not update all formulae and casks blindly (by running brew upgrade without arguments) but to upgrade only some packages (by adding the package name(s) in the command line).

You may also decide to pin some formulae to their current versions using brew pin <formula>; brew upgrade ignores the pinned formulae.
A command to pin the casks is not provided because it is not possible to pin a cask to a certain version. As Homebrew FAQ explains, when a software program uses built-in mechanisms to upgrade itself, pinning the cask to a certain version can lead to inconsistency between the version reported by Homebrew (the one that it tries to pin the cask to) and the actual version of the software, updated by its built-in mechanism. For such software programs, the pin does not actually work, but only produces confusion.

The last command (brew cleanup) removes the old versions of the installed packages from its local cache. Homebrew keeps in a cache the package used to install the current version of a formula or cask.
This command is also not really needed any more, Homebrew cleans the old source packages after it upgrades a formula or a cask. However, brew cleanup is still helpful because it removes (many and small) other files that are not needed any more (logs, caches, etc.)

2021 update

During 2020 the sub-commands of the cask command were gradually integrated into the core of Homebrew and were deprecated. The core commands now operate on both formulae and casks. To limit their scope to only formulae or casks add the --formula or --cask option to the command line.

The cask command has been completely removed from Homebrew in version 2.6.0, released in December 2020.

There is a unified flow now for both formulae and casks:

brew update
brew outdated
brew upgrade

The first command (brew update) gets from the Homebrew servers the information about the most recent versions of the available formulae and casks.

The second command (brew outdated) lists the outdated installed formulae and casks. Add --formulae or --casks to the command line to limit the command scope to formulae or casks. Add --greedy to the command line to include in its output the casks that are marked as "auto-updateable".
This command is not needed. It can be used to see what programs will be upgraded before doing the actual upgrade.

The third command (brew upgrade) upgrades the packages listed by brew outdated. It also supports the options listed above for brew outdated and operates accordingly.


The original answer and the 2018 update are kept for historical reasons.


2018 update

In the meantime, the command brew cask upgrade has been implemented and can be used instead of brew cask reinstall in the script provided in the original answer.

It also works without arguments and upgrades all the casks displayed by brew cask outdated. It can replace the for block in the script that now becomes:

# Upgrade Homebrew and the information about formulas
$ brew update
# List the outdated casks (optional)
$ brew cask outdated
# Upgrade all outdated casks
$ brew cask upgrade

Additional info

Sometimes, brew cask outdated does not list all the outdated casks. This is by design. Some casks mark themselves as auto-updateable while others use the keyword latest as their version. These two categories of casks are not listed by brew cask outdated. To list them one have to add the --greedy option in the command line of brew cask outdated:

$ brew cask outdated --greedy

This command includes in its output the casks mentioned above. Those having latest as their version cannot be checked and are always listed, those marked as auto-updateable are checked and listed only if they are outdated indeed.

The command brew cask upgrade also accepts the --greedy option (internally it uses brew cask outdated to find the list of packages to upgrade). Using it ensures your system is up to date with the additional cost of reinstalling some applications that are not outdated.


The original answer (July 2017)

You are mixing brew commands with brew cask commands and it doesn't work this way.

Homebrew Cask is a component of Homebrew that allows management of graphical applications. It started as an extension of the original Homebrew; it is now an integrated command of brew. Homebrew itself manages only command line applications.

Upgrading command line programs

Upgrading all outdated programs installed with brew (command line programs) is easy:

# Tell Homebrew to update itself and its taps (repositories of programs)
$ brew update
# List the outdated programs
$ brew outdated
# Upgrade all the outdated programs and their dependencies
$ brew upgrade

The brew update and brew outdated steps are optional. brew upgrade internally calls brew update if the last update happened too much time in the past. brew outdated only lists the outdated installed programs; it is useful if you do the upgrade manually and you don't want to upgrade everything. In this case you can pick the programs you want to upgrade and run brew upgrade <program> for each program you want to update. Replace <program> with the package name displayed by brew outdated.

Upgrading graphical programs

Upgrading all outdated graphical programs is not that straightforward at the moment. The process is slightly different than the above.

The first step is to run brew update. It updates Homebrew code and the taps (a tap is a repository of programs managed by Homebrew). Homebrew Cask provides the sub-command brew cask update but it is just an alias of brew update. You can use any of them; brew update is preferred because it is shorter.

The second step is to run brew cask outdated. This command shows the list of outdated programs managed by Cask, together with the installed version and the new version. The option --quiet tells it to show only the package names, without versions. You'll need this for automation on the third step.

The next paragraphs are deprecated since 2018, when the command brew cask upgrade has been implemented. The new flow is described in the section "2018 update" above.

Unfortunately there is no brew cask upgrade command at this moment (it is planned but not implemented yet). brew upgrade doesn't know how to handle the programs installed by brew cask either.

brew cask reinstall can be used instead of the missing brew cask upgrade. Unlike brew upgrade, that upgrades all the outdated packages, brew cask reinstall requires the name of one and only one package. This requires looping through the list returned by brew cask outdated.

A short shell script that upgrades all outdated programs installed using Homebrew Cask can look like this:

brew update
for i in $(brew cask outdated --quiet); do
    brew cask reinstall $i
done

Drawbacks

There are programs that require administrator rights to install drivers or other system components. Some of them ask for your password or for various confirmations using a graphical dialog box. brew cask itself sometimes asks for your password in the command line.

All these make upgrading the outdated programs automatically not always possible.

You may think that all these can be circumvented using sudo. However, the Homebrew developers know better and they programed the brew command to display a message and exit when it is executed as root (and this is the right way to do it.)

2 of 2
8

In 2020

axiac's response is basically perfect. Just to note that brew cask upgrade is disabled in the latest versions of Homebrew, so you should use brew upgrade --cask instead.

🌐
Homebrew
brew.sh
Homebrew: The Package Manager for Everywhere
Homebrew Bundle is declarative: it uses a Brewfile to describe the state you want. Run brew bundle to install missing dependencies, update outdated ones and keep project or machine setup repeatable.
🌐
Homebrew
docs.brew.sh › Installation
Homebrew Documentation: Installation
Command Line Tools (CLT) for Xcode (from xcode-select --install or https://developer.apple.com/download/all/) or Xcode 3 · The Bourne-again shell for installation (i.e. bash) 4 · The Homebrew installer offers various advanced configuration settings. Most users can skip this section and instead follow the instructions on the homepage! If you have issues connecting to GitHub.com, you can use Git mirrors for Homebrew’s installation and brew update by setting HOMEBREW_BREW_GIT_REMOTE and/or HOMEBREW_CORE_GIT_REMOTE in your shell environment with this script:
🌐
Medium
medium.com › @lupingui › how-to-run-the-brew-upgrade-command-on-macos-every-day-b917fb13a6dd
How to Run the brew upgrade Command on macOS Every Day | by Lukes Lu | Medium
August 26, 2023 - Automating the brew upgrade command on macOS is a great way to save time and ensure that your system is up to date. Whether you choose to use cron or launchd, both methods are effective for running the command automatically at the same time every day.
🌐
Joseph Midura
josephmidura.wordpress.com › 2021 › 07 › 03 › updating-homebrew-on-macos
Update Homebrew on macOS With One Script – Joseph Midura
July 14, 2021 - I use brew update to update the formula and Homebrew itself, brew upgrade to update everything, brew cleanup to delete any unfinished downloads, and finally brew doctor to check for issues.
🌐
CircleCI
discuss.circleci.com › build environment
MacOS containers must upgrade Homebrew package location every build! - Build Environment - CircleCI Discuss
December 19, 2018 - It appears that Homebrew made a major update, changed how casks work and where they are stored. As a result of this every time a build runs on a MacOS container that uses brew, it spends 7-10 minutes moving the cask file…
🌐
Mac Install Guide
mac.install.guide › homebrew › 8
Housekeeping for Homebrew · Mac Install Guide
June 27, 2021 - If you don't have time to upgrade all outdated packages, you can upgrade a specific package with brew upgrade <package>. The command brew update is for updating Homebrew itself, as well as the Homebrew core packages that are installed by default.
🌐
Mchael Poncardas
poncardas.com › home › blog › how to update homebrew and formulae
How to Update Homebrew and Formulae | Mchael Poncardas
December 15, 2024 - All-in-one command you can run to update everything (formulae, casks, and Homebrew itself) and clean up old versions afterward · brew update && brew upgrade && brew upgrade --cask && brew cleanup
🌐
GitHub
github.com › Homebrew › brew › issues › 19287
Mac installer packages do not upgrade Homebrew from older versions · Issue #19287 · Homebrew/brew
February 10, 2025 - Brew version is then 4.4.18: /opt/homebrew/bin/brew --version Homebrew 4.4.18 Installed 4.4.20: sudo installer -pkg ~/Downloads/Homebrew-4.4.20.pkg -target / installer: Package name is Homebrew installer: Upgrading at base path / installer: The upgrade was successful.
Author   Homebrew