Homebrew is the most popular package management tool for macOS systems. Using the brew command line utility you can easily add new packages on your mac, but first, you have to install it. This tutorial will help you to install Homebrew on your system using simple commands.
Install Homebrew on macOS
Launch the terminal (/Applications/Utilities/Terminal) application on your system and then run below command on it
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The installation process will prompt for the password. Just enter your password where required to complete the Homebrew installation. The process will take some time.
Once the installation completed, execute the below command to check version.
brew --version omebrew 2.5.11 Homebrew/homebrew-core (git revision 9f822; last commit 2020-11-24)
You may also run the below command to ensure everything is configured correctly.
The above command will show the instructions for correcting any issues.
To upgrade Homebrew, execute the command below in terminal prompt.
cd "$(brew --repo)" git fetch && git reset --hard origin/master && brew update
To uninstall Homebrew, execute the command below in a terminal prompt.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
You can also download the uninstall script and run as below to view more uninstall options.