Skip to content

Instantly share code, notes, and snippets.

@florido
Forked from scheffield/homebrew_version.md
Last active September 14, 2018 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florido/52b7a613c9b2b2c7dbe9dcd4291fe544 to your computer and use it in GitHub Desktop.
Save florido/52b7a613c9b2b2c7dbe9dcd4291fe544 to your computer and use it in GitHub Desktop.
homebrew_version.md

#Some links http://effectif.com/mac-os-x/installing-specific-version-of-homebrew-formula http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula/4158763#4158763 https://github.com/Homebrew/homebrew-versions

#How to install particular version of a formula

  1. finding the commit of the formula change for the version your looking for:
  • cd $(brew --repository)
  • git log -- Library/Formula/<formula_name>.rb or git log -S '<version>' -- Library/Formula/<formula_name>.rb
  1. unlink previous installed version
  • brew unlink <formula_name>
  1. install a particular commit:
  • brew install https://raw.githubusercontent.com/Homebrew/homebrew/<full_commit_hash>/Library/Formula/<formul_name>.rb
  1. check your installation
  • brew info <formula_name>
  • ls -la $(brew --repository)/Cellar/<formula_name>
  1. later switch between versions
  • brew switch <formul_name> <version>

That's what the comment http://stackoverflow.com/a/7787703/504356 states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment