Overview
Homebrew is a free and open-source package manager that simplifies the installation and management of software on macOS and Linux. It provides a convenient way to install, update, and uninstall software applications.
Key Concepts
Formulae:
A script that installs command-line tools and libraries using Homebrew. Think of it as a script to install CLI (command-line interface) apps.
Cask:
An extension of Homebrew that allows you to install macOS applications with graphical user interfaces (GUI) using Homebrew. Think of it as a script to install apps like Google Chrome, Slack etc.
Tap:
An external repository of formulae (and optionally casks) that extends the core functionality of Homebrew. It allows users to access additional packages that are not included in the default Homebrew repository.
Installation
The installation process for Macs (Intel, Apple Silicon) and Linux
Usage
Basic Commands
This command update Homebrew itself and its package information.
This command updates all installed packages
This command shows all outdated packages
This command removes outdated versions of installed packages
This command diagnoses issues with your Homebrew installation and suggests fixes.
This command displays detailed information about your Homebrew setup
Cask Commands
This command installs a macOS application, make sure to replace the <cask_name>
with the name of the application you want to install
Example
This command installs Google Chrome web browser
This command displays a list of all casks (macOS apps) you have installed using Homebrew
This command updates all installed casks to their latest versions.
This command uninstalls a macOS application, make sure to replace the <cask_name>
with the name of the application you want to uninstall
Example
This command uninstalls Google Chrome web browser
Formulae Commands
This command installs a package (also known as a formula) from the Homebrew repository. Replace <formula_name>
with the name of the package you want to install.
Example
This command installs the wget
command-line tool for downloading files from the internet.
This command lists all the packages (formulae) you have installed using Homebrew.
This command updates all installed formulae to their latest versions.
This command uninstalls a package (formula) from your system. Replace <formula_name>
with the name of the package you want to uninstall.
Example
This command uninstalls the wget
command-line tool.
Tap Commands
This command adds a new tap (a third-party repository) to Homebrew. Replace <user/repo>
with the name of the GitHub repository you want to tap.
Example
This command adds the Homebrew Cask repository, which contains macOS applications.
This command lists all the taps you have added to Homebrew.
This command removes a tap from Homebrew. Replace <user/repo>
with the name of the repository you want to remove.
Example
This command removes the Homebrew Cask repository.
This command provides detailed information about a specific tap. Replace <user/repo>
with the name of the repository you want information about.
Example
This command displays detailed information about the Homebrew Cask repository.