First, the official website
Homebrew
II directory
Installation
view help
check the version
update Homebrew own
installation package
package can update query
update package (formula)
to clean up the old version
lock not want to update the package
Uninstall installation package
to view package information
view the installation list
query available packages
unload Homebrew
Third, the commonly used commands
installation
// Installation depends tools
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
View Help
brew help
View version
brew -v
Homebrew own update
brew update
Installation package
brew install [package name]
// install git
BREW install git
// LFS-install git
BREW install git-LFS
// install wget
BREW install wget
//安装openssl
brew install openssl
Queries can update packages
brew outdated
Update package (formula)
// update all
brew upgrade
// update the specified packages
brew upgrade [package name]
Clean up old versions
// clean up old versions of all packages
brew cleanup
// clean up the old version specified package
brew cleanup [package name]
// view the old version of the package can be cleaned, do not perform the actual operation
brew cleanup -n
Lock did not want to update the package
// lock a package
BREW the PIN $ FORMULA
// Unlock
brew unpin $ FORMULA
Uninstall package
brew uninstall [package name]
// Example: Uninstall git
BREW Uninstall git
View package information
brew info [package name]
View the list of installed
brew list
Query packages available
brew search [package name]
Uninstall Homebrew
cd brew --prefix
rm -rf Cellar
brew prune
rm git ls-files
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
Quote from the sky , invasion deleted