STUDY/OS X Mac

Homebrew 사용법

The Simpler 2017. 3. 6. 09:51
CommandDescription
brew --cachePrint path to Homebrew’s download cache (usually ~/Library/Caches/Homebrew)
brew --cellarPrint path to Homebrew’s Cellar (usually /usr/local/Cellar)
brew --configPrint system configuration info
brew --envPrint Homebrew’s environment
brew --prefixPrint path to Homebrew’s prefix (usually /usr/local)
brew --prefix [formula]Print where formula is installed
brew auditAudit all formulae for common code and style issues
brew cleanup [formula]Remove older versions from the Cellar for all (or specific) formulae1
brew create [url]Generate formula for downloadable file at url and open it in $HOMEBREW_EDITOR or $EDITOR2
brew create [tarball-url] --cacheGenerate formula (including MD5), then download the tarball
brew create --fink [formula]Open Fink’s search page in your browser, so you can see how they do formula
brew create --macports [formula]Open MacPorts’ search page in your browser, so you can see how they do formula
brew deps [formula]List dependencies for formula
brew doctorCheck your Homebrew installation for common issues
brew editOpen all of Homebrew for editing in TextMate
brew edit [formula]Open [formula] in $HOMEBREW_EDITOR or $EDITOR
brew fetch --force -v --HEAD [formula]Download source package for formula; for tarballs, also prints MD5, SHA1, and SHA256 checksums
brew homeOpen Homebrew’s homepage in your browser
brew home [formula]Opens formula ’s homepage in your browser
brew infoPrint summary of installed packages
brew info [formula]Print info for formula (regardless of whether formula is installed)
brew info --github [formula]Open Github’s History page for formula in your browser
brew install [formula]Install formula
brew install --HEAD [formula]Install the HEAD version of formula (if its formula defines HEAD)
brew install --force --HEAD [formula]Install a newer HEAD version of formula (if its formula defines HEAD)
brew link [formula]Symlink all installed files for formula into the Homebrew prefix3
brew list [formula]List all installed files for formula (or all installed formulae with no arguments )
brew options [formula]Display install options specific to formula
brew outdatedList formulae that have an updated version available (brew install formula will install the newer version)
brew pruneRemove dead symlinks from Homebrew’s prefix4
brew remove [formula]Uninstall formula
brew searchList all available formula
brew search [formula]Search for formula in all available formulae
brew search /[formula]/Search for /formula/ (as regex) in all available formulae
brew test [formula]If formula defines a test, run it
brew unlink [formula]Unsymlink formula from Homebrew’s prefix
brew updateUpdate formulae and Homebrew itself
brew upgradeInstall newer versions of outdated packages
brew upgrade [formula]Install newer version of 
brew versions [formula]List previous versions of formulae, along with a command to checkout each version





1. Hombrew를 통해 패키지 설치

brew install '패키지명'



2. Homebrew를 통해 설치된 패키지 확인

brew list


Homebrew를 제거

$ cd `brew --prefix`
$ rm -rf Cellar
$ brew prune
$ rm `git ls-files`
$ rmdir Library/Homebrew Library/Aliases Library/Formula Library/Contributions
$ rm -rf .git
$ rm -rf ~/Library/Caches/Homebrew




참고 사이트

https://brew.sh/index_ko.html

https://github.com/mimul/dev-environment/blob/master/mac-homebrew.md