---
title: Homebrew
layout: 2017/sheet
weight: -3
category: CLI
---

### Commands

| Command                    | Description                 |
| ---                        | ---                         |
| `brew install git`         | Install a package           |
| `brew upgrade git`         | Upgrade a package           |
| ---                        | ---                         |
| `brew unlink git`          | Unlink                      |
| `brew link git`            | Link                        |
| `brew switch git 2.5.0`    | Change versions             |
| ---                        | ---                         |
| `brew list --versions git` | See what versions you have  |

### More package commands

| Command                    | Description                 |
| ---                        | ---                         |
| `brew info git`            | List versions, caveats, etc |
| `brew cleanup git`         | Remove old versions         |
| `brew edit git`            | Edit this formula           |
| `brew cat git`             | Print this formula          |
| `brew home git`            | Open homepage               |

### Global commands

| Command         | Description              |
| ---             | ---                      |
| `brew update`   | Update brew and cask     |
| `brew list`     | List installed           |
| `brew outdated` | What's due for upgrades? |

## Also see
{: .-one-column}

* [Homebrew homepage](https://brew.sh/) _brew.sh_
* [Homebrew docs](https://docs.brew.sh) _docs.brew.sh_
* [Homebrew Cask](https://caskroom.github.io/) _caskroom.github.io_
{: .-also-see}
