Homebrew Handy Guide Provides an Easy To Understand Manual For the OS X Homebrew Package Manager Users in Plain English. Minimum things the reader needs to know are – What is Package Manager, Homebrew Package Manager and OSX, Homebrew Installation on OS X with iTerm2. There are many guides available online on Homebrew, including books; however this guide is sufficient for an average developer. Homebrew, unlike aptitude; do not handle the main applications on OS X, App Store is the default Package Manager. In other words, there is sufficient room to play safely.
Homebrew Handy Guide : Basics
It is important to know the locations of Folders and Files Homebrew and iTerm2 combo use. Homebrew install files and installs them under :
1 | /usr/local/ |
Some files installed by the installer are located at :
---
1 | /usr/local/bin/brew |
All packages and related information are stored here :
1 | /usr/local/Cellar/ |
The above location is important, since we can collect any data we want related to Installed or Not Installed Packages. As we are using iTerm2, the profile file is located at $HOME, so you can open and edit using this command :
1 2 3 | nano .zshrc # cd to cd .oh-my-zsh to check oh my zsh stuffs cd .oh-my-zsh && ls |
These are basic commands :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # returns to usernames folder, we usually work here cd $HOME # update homebrew brew update # upgrade home-brew, takes much time brew upgrade # check package directories you have installed ls -dF1 /usr/local/Cellar/* # cache of Homebrew cd /Library/Caches/Homebrew/ && ls # install a package brew install package-name # Homebrew manual man brew # uninstall a package brew remove package-name |
Homebrew Handy Guide : Advanced Usages
The phrase advanced is subjective. Still, these are taken as a bit advanced usages.
1 2 3 4 5 6 7 8 | # check any issue any fix them manually brew doctor # dead formula? brew prune # find stuffs related to one software brew search package-name #example # brew search php |
Huge tips and tricks are here :
1 2 3 4 5 6 | https://github.com/Homebrew/homebrew/wiki/Tips-N'-Tricks # clean cache and check cache brew cleanup && cd /Library/Caches/Homebrew/ # do ls there to check # check homebrew things https://github.com/Homebrew |