Think of Homebrew on your Mac like your kitchen pantry. Over time, you want fresh ingredients (newer versions of your apps and tools), and you also want to toss out the empty cardboard boxes taking up space on the shelf.

Keeping Homebrew updated and clean takes just three short commands in the macOS Terminal—no technical wizardry required.

Step 1: Refresh the Catalog with brew update

Before updating anything, Homebrew needs to check the internet for the latest list of available versions—just like refreshing an app store page.

# Download the newest list of available updates
brew update

Step 2: Update Your Tools with brew upgrade

Once the list is fresh, run brew upgrade to actually install the newer versions of the tools you already have on your Mac.

# Upgrade all outdated Homebrew packages
brew upgrade

Step 3: Free Up Disk Space with brew cleanup

Whenever Homebrew updates a tool, it sometimes keeps older installer files around just in case. Running brew cleanup safely sweeps away those old leftovers and frees up gigabytes of Mac storage.

# Remove old cached installers and outdated versions
brew cleanup

Bonus tip: if you ever want Homebrew to check itself for common setup hiccups, run brew doctor—it will tell you in plain English if anything needs attention.

3 Things to Remember

  • brew update: Refreshes Homebrew's catalog of available app versions.
  • brew upgrade: Installs the newer versions of your existing tools.
  • brew cleanup: Safely deletes old installer leftovers to save Mac disk space.