brew-remove
Uninstall Homebrew packages
TLDR
View documentation for the original command
SYNOPSIS
brew uninstall [options] <formula> [...]
brew uninstall --cask [options] <cask> [...]
PARAMETERS
<formula>
The name of the formula (command-line tool or library) to uninstall. Multiple formulae can be specified.
<cask>
The name of the cask (macOS GUI application) to uninstall. Requires the --cask option.
--formula, --formulae
Explicitly treat all named arguments as formulae. This is usually the default behavior when --cask is not used.
--cask, --casks
Explicitly treat all named arguments as casks. Required for uninstalling macOS GUI applications.
--ignore-dependencies
Do not check or fail if other installed formulae depend on the formula being uninstalled.
--force
Remove all installed versions of a formula, not just the latest. Use with caution as this is irreversible.
--zap
For casks, remove all associated files, including configuration and application support files. This is a destructive operation and should be used carefully.
--cleanup-only
Only remove cached downloads, logs, and other files related to the formula, without uninstalling the formula itself.
--dry-run
Show what would be uninstalled without actually performing the removal.
DESCRIPTION
The command `brew uninstall` is used to remove software packages (known as formulae or casks) that have been installed using the Homebrew package manager. While Homebrew is primarily known for macOS, it can also be used on Linux systems (often referred to as 'Homebrew on Linux' or historically 'Linuxbrew'). This command efficiently uninstalls a specified package, cleaning up its files and symlinks. It's an essential tool for managing installed software, freeing up disk space, and maintaining a clean system. Users can specify multiple packages for removal and utilize options to control the uninstallation process, such as removing all versions of a formula or performing a 'zap' uninstall for casks to remove associated application support files.
CAVEATS
The command `brew-remove` is not a standard Linux command. This analysis pertains to `brew uninstall`, the uninstallation command for Homebrew. While Homebrew can be installed on Linux, it is primarily a package manager for macOS and is not a native Linux package manager like `apt`, `yum`, or `dnf`. Using `--force` or `--zap` can lead to irreversible removal of data or specific versions, so these options should be used with extreme care.
CLARIFICATION ON 'BREW-REMOVE'
There is no direct Linux command named `brew-remove`. The instruction likely refers to `brew uninstall`, which is the command used within the Homebrew ecosystem to remove packages. Homebrew itself can be installed on Linux, enabling its package management capabilities on non-macOS systems.
HOMEBREW ON LINUX
Homebrew on Linux (historically known as Linuxbrew) allows users to install macOS-centric packages and use the Homebrew environment on Linux. It typically installs into a user's home directory (e.g., `$HOME/.linuxbrew` or `/home/linuxbrew/.linuxbrew`) to avoid conflicts with the system's native package manager.
FORMULAE VS. CASKS
`brew uninstall` handles two main types of packages: 'formulae' (command-line tools, libraries, and frameworks) and 'casks' (macOS graphical applications). When uninstalling casks, it's often recommended to use the `--cask` option explicitly to ensure proper handling.
HISTORY
Homebrew was initiated by Max Howell in 2009 for macOS, aiming to simplify software installation. The `brew uninstall` command has been fundamental since its early days, serving as the essential counterpart to `brew install`. Its design reflects Homebrew's philosophy of ease-of-use and clarity in package management, constantly evolving to handle new package types like casks and refine its removal mechanisms over time.
SEE ALSO
brew install(1), brew list(1), brew cleanup(1), apt remove(8), yum remove(8), dnf remove(8), pacman -R(8)


