Skip to content

Instantly share code, notes, and snippets.

@benhosmer
Last active December 19, 2015 14:19
Show Gist options
  • Save benhosmer/5968115 to your computer and use it in GitHub Desktop.
Save benhosmer/5968115 to your computer and use it in GitHub Desktop.
Install a specific version using homebrew.
# From SO: http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
# Or just: brew install https://raw.github.com/Homebrew/homebrew-versions/master/yourpkg-version.rb
Simple Workflow
Step 1:
Navigate to your homebrew base directory (usually this is /usr/local) Example:
cd /usr/local
Step 2:
Enter brew versions <formula> ( is the formula you want to install).
You will then get something like:
1.0.1 git checkout 1234567 Library/Formula/<formula>.rb
1.0.0 git checkout 0123456 Library/Formula/<formula>.rb
...
Step 3:
Choose the desired version and check it out via copy and paste of the desired version line (leave out the version number in the beginning).
Example for getting 1.0.0:
git checkout 0123456 Library/Formula/<formula>.rb
Step 3.5 (maybe necessary)
brew unlink <formula>
Step 4:
brew install <formula>
Step 5:
DONE, you can now use brew switch <formula> <version> to switch between versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment