Skip to content

Latest commit

 

History

History
85 lines (67 loc) · 2.3 KB

homebrew.md

File metadata and controls

85 lines (67 loc) · 2.3 KB
title description created updated color
Homebrew
Homebrew is a simple package management software for macOS & Linux. This Cheatsheat shows how to search, install, upgrade & uninstall softwares using Homebrew
2019-06-16
2019-06-16

Installation for MacOS

Prerequisities

Install command-line tools if not already installed by running the following command

xcode-select --install

Note: If you have installed Xcode already then your mac already have command-line tools.

Install Homebrew

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

Installing a software

You can install brew available softwares by running the following command

brew install <software_name>

example

brew install mongodb

If you want to install a specific version of a sooftware, you can mention the available version name using @<version>

Example

brew install mongodb@3.6

Uninstalling a softwware

You can uninstall a installed software by running the following command

brew remove <software_name>

example

brew remove mongodb

Searching for a software

You can search available softwares by running following command

brew search <software_name>

Example

$ brew search mongodb
==> Formulae
mongodb ✔                                mongodb@3.2                              mongodb@3.6
mongodb@3.0                              mongodb@3.4                              percona-server-mongodb

==> Casks
mongodb                                  mongodb-compass-community                mongodbpreferencepane
mongodb-compass                          mongodb-compass-isolated-edition         nosqlbooster-for-mongodb
mongodb-compass-beta                     mongodb-compass-readonly                 orelord-mongodb

Other useful commands

Command Use Example
brew doctor self-diagnose shows if the installatin is correct or not NA
brew upgrade <software_name> To Update a installed sooftware brew upgrade mongodb

Uninstalling Homebrew

In case you decided to completely uninstall Homebrew from your Mac, you can run the followiong command to uninstall

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