brew-uninstall
Uninstall packages installed by Homebrew
TLDR
Uninstall a formula/cask
Uninstall a cask and remove all associated files
SYNOPSIS
brew uninstall [options] formula|cask ...
PARAMETERS
-f, --force
Remove all versions of the formula/cask, not just the current one.
Without this, the oldest version is retained.
-i, --ignore-dependencies
Uninstall even if other installed formulae depend on it.
--ignore-missing
Don't fail if the formula/cask isn't installed.
-c, --cask
Treat all named arguments as casks (GUI apps).
--ignore-pinned
Ignore pinned versions and uninstall anyway.
-s, --skip-post-install
Skip running post-install scripts (rarely needed).
-v, --verbose
Print verbose progress information.
-n, --dry-run
Show what would be uninstalled without actually doing it.
--quiet
Make some output more quiet.
-h, --help
Show help message.
DESCRIPTION
The brew uninstall command (also aliased as brew remove or brew rm) is part of Homebrew, a popular package manager originally for macOS but fully supported on Linux via Linuxbrew. It safely removes specified formulae (command-line packages) or casks (GUI apps) along with their files, while handling dependencies intelligently to avoid breaking other installed software.
On Linux, Homebrew typically installs to $HOME/.linuxbrew or /home/linuxbrew/.linuxbrew, making it user-friendly without root privileges. The command scans the cellar (installation directory), deletes binaries, man pages, and linked files, and optionally prunes unused dependencies with brew autoremove. It preserves the oldest version by default unless --force is used, allowing easy reinstallation or version switching.
Usage is straightforward: run brew uninstall package-name. It provides verbose output for transparency and prompts for confirmation on potentially risky operations. Ideal for managing development tools like Node.js, Python, or Git without cluttering system packages.
CAVEATS
On Linux, ensure Homebrew prefix is in $PATH; uninstalling core utils may require --ignore-dependencies. Doesn't remove symlinks outside cellar automatically. Use brew cleanup post-uninstall for disk space.
EXAMPLES
brew uninstall wget
brew uninstall --force --ignore-dependencies git
brew uninstall --cask firefox
ALIASES
Equivalent to brew remove or brew rm for brevity.
HISTORY
Homebrew created by Max Howell in 2009 for macOS. Linux support via Linuxbrew (2014, by Michka Popov), merged back in 2018. brew uninstall evolved from early brew remove, adding dependency handling and cask support by 2012.
SEE ALSO
brew(1), brew-list(1), brew-autoremove(1), brew-rm(1)


