• cd /usr/local
  • git status
  • Discard all the changes (unless you actually want to try to commit to Homebrew - you probably don't)
  • git status til it's clean
  • brew update
Answer from corysimmons on Stack Overflow
🌐
Mac Install Guide
mac.install.guide › homebrew › 4
Update Homebrew · Short Complete Guide · 2026
June 24, 2021 - It is important to know that brew update and brew upgrade are different. Update is for Homebrew itself. Upgrade is for individual software packages. You won't need to bring software packages up to date until you need the latest versions, so you may not run this command often.
Discussions

Homebrew users — reminder to update and upgrade (plus other neat things you can do from the command line)
My go to: steep() { brew update brew upgrade brew cask upgrade brew cleanup } More on reddit.com
🌐 r/MacOS
26
215
December 10, 2019
macos - How to update packages installed via Homebrew? - Ask Different
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". More on apple.stackexchange.com
🌐 apple.stackexchange.com
April 22, 2020
looking for forgotten brew command
IIRC, you have brew install a script or something. AI seems to confirm this... configure brew to auto upgrade To configure Homebrew to auto-update, you can use the homebrew-autoupdate script, which runs brew update in the background every 24 hours (configurable) and can also handle brew upgrade and brew cleanup automatically. Here’s a step-by-step guide: Install homebrew-autoupdate:brew tap domt4/autoupdate Start the autoupdate service:brew autoupdate --start 43200 This will configure the script to run every 24 hours (43200 seconds). Optional flags: --upgrade: Run brew upgrade automatically. --cleanup: Run brew cleanup automatically. --immediate: Run the update immediately instead of waiting for the scheduled interval. --sudo: Run the update with elevated privileges. You can combine these flags to customize the behavior. For example: brew autoupdate --start 43200 --upgrade --cleanup --immediate --sudo Note that homebrew-autoupdate does not interfere with Homebrew’s built-in autoupdate mechanism. If you prefer a different approach, you can create a bash script to run brew update and brew upgrade manually. This script can be placed in a directory like ~/bin and added to your shell’s startup file (e.g., ~/.zshrc or ~/.bashrc) to run automatically whenever you open a new shell. For example: #!/bin/bash # Run brew update and upgrade brew update brew upgrade # Add this script to your shell's startup file Make sure to make the script executable with chmod +x ~/bin/auto_homebrew_update and add it to your shell’s startup file. In iTerm, you can also add a custom command to run this script automatically whenever you open a new terminal window. To do this, go to iTerm’s Preferences > Profiles > Terminal > Command > Run custom command instead of shell startup file. Then, enter the path to your script (e.g., ~/bin/auto_homebrew_update) and set the shell to /bin/bash. Edit: You could also make a script to run brew upgrade and use launchd to run it at certain times... Appstore has a launchd editor Launchd Task Scheduler More on reddit.com
🌐 r/MacOS
6
6
August 24, 2024
Is there no fix for Homebrew on Sonoma??
have you followed the litterally-1-step install? More on reddit.com
🌐 r/MacOS
22
0
April 3, 2024
  • cd /usr/local
  • git status
  • Discard all the changes (unless you actually want to try to commit to Homebrew - you probably don't)
  • git status til it's clean
  • brew update
Answer from corysimmons on Stack Overflow
🌐
Homebrew
docs.brew.sh › FAQ
Homebrew Documentation: FAQ (Frequently Asked Questions)
If you want your new formula to be part of homebrew/core or want to learn more about writing formulae, then please read the Formula Cookbook. Ensure you have a local copy of homebrew/core, then: brew update brew install gh cd "$(brew --repository ...
🌐
Homebrew
brew.sh
Homebrew: The Package Manager for Everywhere
Some casks auto-update outside Homebrew, so use brew upgrade --greedy if you want Homebrew to update them too. Casks in homebrew/cask require human review before they are accepted, changed or updated and must meet the requirements in Acceptable ...
🌐
Homebrew
docs.brew.sh › Manpage
Homebrew Documentation: brew(1) – The Package Manager for Everywhere
Always do a slower, full update check (even if unnecessary). ... Print the directories checked and git operations performed. ... Display a trace of all shell commands as they are executed. Runs brew update --auto-update only if needed.
🌐
Medium
medium.com › @sumanchapai › updating-homebrew-packages-a17afccd2f34
Updating homebrew packages - Suman Chapai - Medium
January 21, 2024 - In order to get a newer version of the package you’ll first have to update homebrew by running brew update. What this does is tell homebrew to get a list of latest version of brew packages.
Find elsewhere
🌐
DEV Community
dev.to › novicedev › how-to-update-homebrew-on-mac-50jl
How to UPDATE HOMEBREW on Mac? - DEV Community
January 19, 2023 - Are you looking to update your Homebrew and its packages on your mac? It's an easy process and can be done in just 2 steps. First, open up your terminal and type in the following command: "brew update".
🌐
NoviceDev
novicedev.com › blog › how-update-homebrew-mac
How to UPDATE HOMEBREW on Mac? | NoviceDev
September 13, 2023 - You might have installed Homebrew ... done in just 2 steps. First, open up your terminal and type in the following command: "brew update"....
🌐
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
🌐
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 - My initial thought was that I could just create a simple alias to run all four commands at once: alias brewup='brew update; brew upgrade; brew cleanup; brew doctor'
🌐
Linux Command Library
linuxcommandlibrary.com › man › brew-update
brew-update man | Linux Command Library
brew update fetches the newest version of Homebrew and all formulae from GitHub using git, and performs any necessary migrations.This command does not upgrade installed packages - use brew upgrade for that.Aliases: brew up
🌐
SS64
ss64.com › mac › brew.html
BREW Command: Install and update software in macOS
HOMEBREW_AUTO_UPDATE_SECS Run brew update once every HOMEBREW_AUTO_UPDATE_SECS seconds before some commands, e.g. brew install, brew upgrade and brew tap.
🌐
OS X Daily
osxdaily.com › home › how to update homebrew on mac
How to Update Homebrew on Mac - OS X Daily
February 13, 2021 - If you want to avoid updating certain formula you can use the following brew command to keep the version at present:
🌐
Erwin Bierens Blog
erwinbierens.com › update-homebrew-on-macos
Update Homebrew on MacOS - Erwin Bierens Blog
July 6, 2022 - This command will update the homebrew app and will list all programs that you have installed but have newer versions available. ... If you want to avoid updating certain formulae you can use the following brew command to keep the version at present version:
🌐
CommandMasters
commandmasters.com › commands › brew-update-common
How to use the command 'brew update' (with examples)
One of the core capabilities of ... command is a fundamental part of this process, allowing users to fetch the latest versions of Homebrew and all its formulae from GitHub....
Top answer
1 of 3
20

If you're only trying to upgrade one package:

brew upgrade package_name

All packages

brew update && brew outdated && brew upgrade && brew cleanup

Note, I had to add my own answer for this since I got here looking for just one, and noticed the top answer had brew upgrade --cask, while I got the following from here:

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.

2 of 3
12

To have your packages and apps you just need to run these commands in your terminal:

brew update && brew upgrade && brew upgrade --cask && brew cleanup
🌐
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
🌐
DEV Community
dev.to › dev_neil_a › how-to-auto-update-and-upgrade-homebrew-1kpe
How To Auto Update and Upgrade Homebrew - DEV Community
April 27, 2026 - brew autoupdate start 86400 --ac-only --cleanup --immediate --sudo --upgrade · The order the settings are in does not matter, except for the time, which I believe must go first. ... 86400 sets autoupdate to run every 24 hours from when the ...
🌐
AppleInsider
appleinsider.com › articles › 23 › 02 › 28 › mac-package-installer-homebrew-updated-with-speed-enhancements-more
Mac package installer Homebrew updated with speed enhancements & more | AppleInsider
February 28, 2023 - To run the update, type in Terminal: brew update and press Return. Optionally, you can run brew doctor in Terminal to check that everything is installed and working by entering brew doctor and press Return.
🌐
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 - The brew upgrade command is a useful tool for updating and upgrading packages on your macOS system. However, remembering to run this…