This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 5
The brew command
sedm0784 edited this page Sep 13, 2010
·
40 revisions
Use man brew
to view the manpage.
You can update outdated packages like so:
brew install `brew outdated`
(or brew outdated | xargs brew install
)
Command | Consequence |
---|---|
brew install foo |
Installs foo |
brew search |
Lists all formula that you can install |
brew search foo |
Searches for foo in formula available to install |
brew search /foo/ |
Same as above but parses /foo/ as a regex |
brew list |
Lists all installed formulae |
brew list foo |
Lists the installed files for foo |
brew info --github foo |
Open your browser at the Github History page for formula foo |
brew info |
Summarises all installed Homebrew packages |
brew info foo |
Gives all available information for installed or not installed formula foo |
brew home |
Open’s Homebrew’s homepage in your default browser |
brew home foo |
Opens foo’s homepage in your default browser |
brew remove foo |
Uninstalls foo |
brew create [url] |
Generates a formula for the downloadable file at url and opens it in TextMate 1 |
brew create url-of-tarball --cache |
Generates a formula, then downloads the tarball. Adds the md5 to the formula template for you |
brew create --macports foo |
Open your browser at the MacPorts package search page, so you can see how they do foo |
brew create --fink foo |
Same thing, but for Fink |
brew edit foo |
Opens the formula in TextMate |
brew link foo |
Symlinks all of foo’s installed files into the Homebrew prefix 2 |
brew unlink foo |
Unsymlinks foo from the Homebrew prefix |
brew prune |
Removes dead symlinks from the Homebrew prefix 3 |
brew outdated |
Shows formula that have an updated version available . To install the new version of foo: brew install foo
|
brew --config |
Print some useful system configuration to the console |
brew --prefix |
Display the real path to your Homebrew prefix (Usually /usr/local) |
brew --prefix (formula) |
Display the path where this formula is installed |
brew --cellar |
Display the real path to your Homebrew Cellar (Usually /usr/local/Cellar) |
brew --cache |
Display the real path to where Homebrew caches downloads (Usually ~/Library/Caches/Homebrew) |
brew doctor |
Checks your installation for common issues |
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 |
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.