Extended Brain Storage

# macOS: Install Homebrew

Posted on July 2, 2013

A couple of hints to Homebrew, its installation and usage on macOS (previously Mac OS X, then OS X)…

### Installation

Homebrew is “the missing package manager for macOS” and it enables users to “install the stuff they need that Apple didn’t”. It can be installed as follows:

$/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


### Usage

Homebrew can inspect the system and make sure that everything is properly set up using:

$brew doctor  Time to time, Homebrew’s database of packages (called formulae) needs to be updated and the packages upgraded using: $ brew update && brew upgrade


Searching a package (i.e. formula) using a SEARCH_TERM through available packages can be done by:

$brew search SEARCH_TERM  Packages can also be looked up online http://formulae.brew.sh/ using the same SEARCH_TERM. The list of all installed packages can be shown by: $ brew list


In order to install a PACKAGE, the following command needs to be run:

$brew install PACKAGE  And to uninstall: $ brew uninstall PACKAGE


### Formula Removal Note

The problem with uninstallation process is that it removes the particular formula (package) only. The rest of the unused dependencies remains in the brew root directory. Therefore, it may be useful to install homebrew-rmtree designed by user beeftornado.

The repository (called a tap) needs to be set up (tapped) first by:

$brew tap beeftornado/rmtree  Finally, the rmtree/brew-rmtree formula can be installed by: $ brew install beeftornado/rmtree/brew-rmtree


In order to remove the whole FORMULA tree, the following needs to be applied:

$brew rmtree FORMULA  ### Analytics As it has became popular recently, information and data gathering rules the digital world today. Homebrew is not an exception. On the other hand, the developers are fair and let the users opt out of the enabled anonymous aggregate user behaviour analytics in the following ways: $ echo "export HOMEBREW_NO_ANALYTICS=1" > ~/.profile


and

\$ brew analytics off


Tags: #macOS #brew #homebrew