Homebrew - The Missing Package Manager for macOS (or Linux)
Homebrew is an essential piece of software to help you organize the tools you use. The package manager allows you to install a large number of software like
NodeJS or new versions of Git and will help you to keep them up to date.
These Homebrew commands will help you installing and maintaining the set of tools you need to develop good software.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Homebrew will give you a convenient way to install a package as simple as running the following in your terminal:
brew install <package>
brew upgrade, update outdated
You want to update a specific package? Run the following command:
brew upgrade <package>
If there is a package that you want to exclude from further updates, you can pin the package’s version like this:
brew pin <package>
In order to update Homebrew itself, run
Simply run the following command to check all packages at once:
Homebrew Cask provides a friendly CLI workflow for the administration of macOS applications distributed as binaries.
Tap the Cask repository from Github.
brew search, info
To check if there is a specific package, you can run:
brew search <term>
Homebrew will list all matching packages that you can install with
brew install <package> as mentioned above.
Before installing a package, you can also lookup some information about it by running:
brew info <package>
This will give you a description and further dependencies and requirements.
brew services list
Clean up old versions of all packages.
Clean up the old version of the specified package.
brew cleanup <package>
Remove old symlinks.
brew remove --force --ignore-dependencies $(brew list)
To remove our package, we can run the uninstall task:
brew uninstall <package>
View the old version package that can be cleaned up without performing actual operations.
brew cleanup -n
It is possible to add additional repositories to homebrew by making use of the brew tap command. This allows you to install additional applications that does not form part of the default set of repositories.
List all the current tapped repositories (taps)
If you don’t mind the collection of metrics then you do not have to do anything. If you do not want to be anonymously tracked then simply turn off the analytics:
brew doctor first! It will give you a bunch of useful hints like:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"