refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / brew / README.md
1 ---
2 title: Homebrew
3 homepage: https://brew.sh
4 tagline: |
5   Brew: The Missing Package Manager for macOS (and Linux).
6 ---
7
8 ## Updating `brew`
9
10 `brew` has its own built-in upgrade management.
11
12 ```bash
13 brew update
14 brew upgrade
15 ```
16
17 ## Cheat Sheet
18
19 > Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
20
21 **Important**: This will install `brew` to `~/.local/opt/brew/`, NOT
22 `/usr/local`. The ability to install brew, without `sudo`, in your HOME
23 directory is a relatively new feature. If you do encounter a `brew install`
24 issue, [report it to brew](https://github.com/Homebrew/homebrew-core/issues).
25 way, report it to brew.
26
27 ### How to install CLI packages
28
29 ```bash
30 brew update
31 brew install node
32 ```
33
34 ### How to install GUI packages
35
36 ```bash
37 brew update
38 brew cask install docker
39 ```
40
41 ### Where are things installed?
42
43 ```bash
44 ~/.local/opt/brew/
45 ```
46
47 For reference, traditional `brew` installs here:
48
49 ```bash
50 /usr/local/Cellar/
51 /opt/homebrew-cask/Caskroom/
52 ```
53
54 ### `brew` screwed up everything, now what?
55
56 Sometimes you're compelled against all reason to do something really stupid,
57 like `brew upgrade` or `brew update python`, and your whole system gets borked.
58
59 If you need to _uninstall_ and _reinstall_ local brew:
60
61 ```bash
62 rm -rf ~/.local/opt/brew
63 webi brew
64 ```
65
66 If you need to _uninstall_ global brew:
67
68 For _Mojave_, _Catalina_, _Big Sur_, and above:
69
70 ```bash
71 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
72 ```
73
74 For _High Sierra_ and below:
75
76 ```bash
77 /bin/bash -c ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
78 ```