LinuxCommandLibrary

brew-update

Update Homebrew and its package recipes

TLDR

Fetch the newest version of Homebrew and all formulae

$ brew update
copy

SYNOPSIS

brew update [options]

PARAMETERS

--force
    Force a hard update, even if Homebrew thinks it's already up-to-date.

--verbose, -v
    Print more detailed information during the update process.

--debug
    Display debug information and enable debugging mode.

--auto-update
    Explicitly enable auto-update. This is the default behavior for many brew commands.

--no-auto-update
    Disable auto-update for this particular command invocation.

DESCRIPTION

Note: The command is typically spelled brew update, not brew-update. This analysis assumes the user is referring to the brew update command for Homebrew installed on a Linux system.

The brew update command is used to synchronize your local Homebrew installation with the latest changes from Homebrew's Git repository. This includes fetching the newest versions of formulae (package definitions), taps (third-party repositories), and Homebrew's own source code. It essentially refreshes Homebrew's understanding of available software and its dependencies, but it does not upgrade or install any software packages themselves. Think of it as updating the catalog of available software before you can install or upgrade anything. It's a crucial first step before attempting to upgrade installed packages with brew upgrade or installing new ones, ensuring you are working with the most current information.

CAVEATS

The command is brew update, not brew-update. Homebrew is a package manager originally for macOS but fully supported on Linux (formerly known as Linuxbrew). This command updates Homebrew's *definitions* and *itself*, not the software packages you have installed. To upgrade installed packages, you must run brew upgrade after brew update. A working internet connection is required for this command to function.

AUTOMATIC UPDATES

Many brew commands (e.g., brew install, brew upgrade) automatically run brew update in the background by default to ensure you're working with the latest formulae. You can disable this for a single command by passing --no-auto-update, or configure it globally.

DIFFERENCE FROM OTHER LINUX PACKAGE MANAGERS

Unlike traditional Linux package managers like apt update (Debian/Ubuntu) or yum update/dnf update (Red Hat/Fedora) which both fetch updates and often apply them, brew update solely fetches the latest definitions. It's more analogous to apt update (fetching package lists) without the apt upgrade (installing updates) component.

HISTORY

Homebrew began as a package manager for macOS. Over time, a fork called 'Linuxbrew' was created to bring its convenient and user-friendly package management system to Linux distributions. In 2019, Linuxbrew was officially merged back into the main Homebrew project, allowing Homebrew to be installed and used natively on Linux as 'Homebrew on Linux'. The brew update command has been a core part of Homebrew's functionality since its early days, essential for keeping the local Homebrew installation synchronized with upstream changes and new software definitions.

SEE ALSO

brew upgrade(1), brew install(1), brew doctor(1), brew cleanup(1), brew list(1)

Copied to clipboard