-
Notifications
You must be signed in to change notification settings - Fork 2
The brew command
Use man brew to view the manpage.
| Command | Consequence |
|---|---|
brew --cache |
Display the real path to where Homebrew caches downloads (usually ~/Library/Caches/Homebrew) |
brew --cellar |
Display the real path to your Homebrew Cellar (usually /usr/local/Cellar) |
brew --config |
Print some useful system configuration to the console |
brew --prefix [formula] |
Display the path where this formula is installed |
brew --prefix |
Display the real path to your Homebrew prefix (usually /usr/local) |
brew audit |
Audits all formulae for common code and style issues |
brew cleanup foo |
For all installed or specific formulae, removes any older versions from the cellar 4 |
brew create --fink foo |
Same thing, but for Fink |
brew create --macports foo |
In default browser, open the MacPorts package search page, so you can see how they do foo |
brew create [url] |
Generates a formula for the downloadable file at url and opens it in $BREW_EDITOR or $EDITOR 1 |
brew create url-of-tarball --cache |
Generates a formula (including MD5), then downloads the tarball |
brew doctor |
Checks your installation for common issues |
brew edit foo |
Opens the formula in $HOMEBREW_EDITOR or $EDITOR |
brew fetch --force -v --HEAD foo |
Download the source package for the given formula. For tarballs, also prints MD5 and SHA1 checksums. |
brew home foo |
Opens foo ’s homepage in your default browser |
brew home |
Opens Homebrew’s homepage in your default browser |
brew info --github foo |
Open your browser at the Github History page for foo |
brew info foo |
Gives all available info foo (regardless of whether foo is installed) |
brew info |
Summarises all installed Homebrew packages |
brew install --force --HEAD foo |
Installs a newer HEAD version of foo |
brew install --HEAD foo |
Installs the HEAD version of foo (if defined in its recipe) |
brew install foo |
Installs foo |
brew link foo |
Symlinks all installed files for foo into the Homebrew prefix 2 |
brew list foo |
Lists the installed files for foo |
brew list |
Lists all installed formulae |
brew outdated |
Shows formula that have an updated version available (brew install foo will install the newer version) |
brew prune |
Removes dead symlinks from the Homebrew prefix 3 |
brew remove foo |
Uninstalls foo |
brew search /foo/ |
Same as above but parses /foo/ as a regex |
brew search foo |
Searches for foo in formula available to install |
brew search |
Lists all formula you can install |
brew unlink foo |
Unsymlinks foo from the Homebrew prefix |
brew update |
Update homebrew formulae and Homebrew itself |
You can update outdated packages like so:
brew install `brew outdated` (or brew outdated | xargs brew install (or brew upgrade))
1 Homebrew will attempt to automatically derive the formula name and version, if it fails, you’ll have to make your own template. I suggest copying wget’s.
2 This is done automatically when you install formula. It is useful for DIY installation, or in cases where you want to swap out different versions of the same package that you have installed at the same time.
3 This is generally not needed. However, it can be useful if you are doing DIY installations.
4 To delete only a specific out of date version, just go to the folder in the Cellar and “rm -rf” it, or drag it to the trash in Finder.