🍴

brew usage

search

$ brew search httpie
$ brew search cask

install

$ brew install httpie # if just a command
$ brew cask wewechat # if is an app

list outdated package

$ brew outdated

upgrade

$ brew upgrade # upgrade all packages
$ brew upgrade httpie # update specific package

update

$ brew update # update brew local mirror

tap

$ brew tap
homebrew/cask
homebrew/core
homebrew/services
nonchalant/appicon
$ brew tap FaiChou/test # add https://github.com/FaiChou/homebrew-test to formula repository

If you install any formula, brew will search by the order:

  1. custom repo
  2. homebrew/core

pin

Preventing formula from being upgraded when issuing the brew upgrade formula command.

clean

$ brew cleanup # delete old and cache files
$ brew cleanup -n # list what will be cleaned up

homepage

$ brew home httpie # visit httpie's homepage

list

$ brew list

check info

$ brew info httpie

if you occurs

Error: formula: /usr/local/Homebrew/…/xxx.rb:6 syntax error, unexpected <<

Fetch and reset Homebrew and all tap repositories to their latest origin/master.

$ brew update-reset

also

As we can see on the info page, packages are installed to /usr/local/Cellar/ folder.

The normal flow is: update -> upgrade -> cleanup.


在我们一生中,命运赐予我们每个人三个导师,三个朋友,三名敌人,三个挚爱。但这十二人总是不以真面目示人,总要等到我们爱上他们、离开他们、或与他们对抗时,才能知道他们是其中哪种角色。