Skip to content

Instantly share code, notes, and snippets.

@sibsfinx
Last active August 29, 2015 14:24
Show Gist options
  • Save sibsfinx/7cef2fd3247a44e1aaca to your computer and use it in GitHub Desktop.
Save sibsfinx/7cef2fd3247a44e1aaca to your computer and use it in GitHub Desktop.
homebrew — switch versions

Sometimes you need to switch homebrew package versions.

For example, due to this issue with imagemagick:

This installation of RMagick was configured with ImageMagick 6.8.9 but ImageMagick 6.9.0-9 is in use.

Clone homebrew repo and find commit with necessary version in git log (mine was 1e30cbf for imagemagick 6.8.9-1)

git clone [email protected]:Homebrew/homebrew.git
cd homebrew
git log Library/Formula/imagemagick.rb
brew unlink imagemagick
brew install https://raw.githubusercontent.com/Homebrew/homebrew/1e30cbf/Library/Formula/imagemagick.rb
brew switch 6.8.9-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment