brew Verified current stable Not installed? Package Management

Brew / Upgrade Specific Formula Or Cask

Upgrade Specific Formula Or Cask

Upgrades a specified Homebrew package or cask to its latest version.

$
Terminal
brew upgrade <formula|cask>

When To Use

For a controlled update process targeting a specific application or library, ensuring compatibility.

Pro Tip

Running 'brew upgrade {package} --dry-run' first helps validate potential issues without executing changes.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
brew upgrade <formula|cask>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
==> Upgrading 2 outdated packages:

homebrew/core/formula_name  1.0.0 -> 1.1.0
cask_name                  2.0.0 -> 2.1.0

==> Upgraded 2 packages successfully!

Anatomy of Output

Understanding the result

Upgrading git... Specific Package Upgrade Notification

Feedback indicates the process is underway for the specified package.

==> Upgrading to 2.34.0... Specific Version Notification

Confirms the package upgrade target version.

==> Successfully upgraded git. Success Confirmation

Indicates the upgrade was completed successfully.

Power User Variants

Optimized versions

brew upgrade {formula|cask} --dry-run

Preview the upgrade action for a specific package without applying changes.

brew upgrade {formula|cask} --verbose

Display detailed upgrade process output.

Troubleshooting

Common pitfalls

Error: No package named 'nonexistent-package'

Solution: Double-check the package name for accuracy with 'brew list' or 'brew search'.

Error: Upgrade failed: git is in use

Solution: Terminate any running processes related to 'git' before attempting the upgrade.

Error: Permission denied while attempting to upgrade

Solution: Run command with elevated permissions using 'sudo' when necessary.

Command Breakdown

What each part is doing

brew
Base Command
The executable that performs this operation. Here it runs Brew before the shell applies any redirect operators.
<formula|cask>
formula|cask
The value supplied for formula|cask.

How To Run

Execution path

  1. Step 1

    Run `brew upgrade <formula|cask>` to upgrade the desired package.

  2. Step 2

    Verify the upgrade by running `brew list --versions <formula|cask>` to check versions.

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.