Skip to content

Instantly share code, notes, and snippets.

@tommydunn
Last active April 1, 2016 22:19
Show Gist options
  • Select an option

  • Save tommydunn/f52e843da93a4d047103676d54248c96 to your computer and use it in GitHub Desktop.

Select an option

Save tommydunn/f52e843da93a4d047103676d54248c96 to your computer and use it in GitHub Desktop.
### Homebrew
### Uninstall
```
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
```
### Install cask
```
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew tap caskroom/cask && brew install brew-cask
```
### Update
```
brew update && brew upgrade brew-cask && brew cleanup
```
# Package/formula install directory
ls -dF1 /usr/local/Cellar/*
# Install a package/formula
brew install node
# Display package/formula details
brew info node
# Display installed packages/formula
brew list
# Search for a package/formula
brew search php
# Update brew
brew update
# Upgrade a package/formula
brew upgrade node
# Upgrade all packages/formulas
brew upgrade
# Troubleshooting
brew doctor
# Further help
man brew
brew home
# Incorrect permission issue
# - https://github.com/mxcl/homebrew/issues/13276
#
# What doctor said:
#
# Error: Some directories in /usr/local/share/locale aren't writable.
#
# This can happen if you "sudo make install" software that isn't managed
# by Homebrew. If a brew tries to add locale information to one of these
# directories, then the install will fail during the link step.
#
# You installing something via sudo or a pkg, and it took ownership of a
# bunch of share folders. You'll want to chown them back to your user.
#
# The following command should set the correct ownership and group for all files and directories
# below and including `/usr/local/share`
sudo chown -R $(whoami) /usr/local
# Troubleshooting
# https://github.com/mxcl/homebrew/wiki/Troubleshooting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment