search
$ brew search httpie$ brew search cask
install
$ brew install httpie # if just a command$ brew cask wewechat # if is an applist outdated package
$ brew outdatedupgrade
$ brew upgrade # upgrade all packages$ brew upgrade httpie # update specific packageupdate
$ brew update # update brew local mirrortap
$ brew taphomebrew/caskhomebrew/corehomebrew/servicesnonchalant/appicon$ brew tap FaiChou/test # add https://github.com/FaiChou/homebrew-test to formula repositoryIf you install any formula, brew will search by the order:
- custom repo
- 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 uphomepage
$ brew home httpie # visit httpie's homepagelist
This will list all formulae including auto installed dependencies.
$ brew listleaves
Show installed formulae that are not dependencies of another installed formula.
$ brew leavescheck 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-resetalso
As we can see on the info page, packages are installed to /usr/local/Cellar/ folder.
The normal flow is: update -> upgrade -> cleanup.