Homebrew on macOS
- Diniz Martins

- 20 hours ago
- 1 min read
If you use Homebrew to manage your development tools on macOS, keeping it updated is an important part of maintaining a reliable development environment. A simple maintenance routine helps keep packages current, removes unnecessary files, and detects potential issues before they become real problems.
What each command does
brew update: Fetches the latest Formulae and Cask definitions from the Homebrew repositories.
brew upgrade: Upgrades all installed command-line packages to their latest stable versions.
brew upgrade --cask: Updates all GUI applications installed through Homebrew, such as Visual Studio Code, Docker Desktop, Google Chrome, Postman, and many others.
brew cleanup: Removes outdated package versions and cached downloads, freeing up disk space.
brew doctor: Checks your Homebrew installation and reports any configuration issues or potential problems.
Check for available updates
To see what can be upgraded before making any changes:
brew outdatedFor Homebrew Cask applications only:
brew outdated --caskWhy I run this regularly
Keeps development tools up to date
Applies the latest security fixes
Helps prevent dependency conflicts
Frees unnecessary disk space
Detects potential configuration issues
Maintains a stable and reliable development environment
Quick maintenance command
If you simply want to update everything in one go, this command performs the complete maintenance routine:
brew update && brew upgrade && brew upgrade --cask && brew cleanup && brew doctorKeeping your Homebrew environment healthy only takes a few seconds, but it can save hours of troubleshooting later.
Comments