Homebrew is a popular package manager for Mac OSX. Package managers make it easier to install and update software on your computer.
To install Homebrew, you need to have Command Line Tools for Xcode installed. It comes with Xcode. If you don't want to download Xcode, you can run this command:
or download it from here.
Then, run the following command in the Terminal to install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To make sure that everything worked, run this:
Install a package:
brew install <package name>
For example, one way to install git on a Mac is to run this:
brew install git
Uninstall a package:
brew uninstall <package name> brew uninstall <package name> --force # to uninstall all versions
To remove old versions of packages:
List all installed packages:
brew upgrade # to upgrade all packages brew upgrade <package name> # to upgrade a particular package