From e4b4ad532f358d634b7b2582afe823f4f1f60c82 Mon Sep 17 00:00:00 2001 From: Joel B Schwartz Date: Wed, 4 Nov 2015 12:59:45 -0500 Subject: [PATCH] Tips-N'-Trick: add a tip to use switch. I find brew switch very helpful to activate a different version of an installed formula. This seems worth calling out in the documentation to elevate awareness. Closes Homebrew/homebrew#45694. Signed-off-by: Mike McQuaid --- share/doc/homebrew/Tips-N'-Tricks.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/share/doc/homebrew/Tips-N'-Tricks.md b/share/doc/homebrew/Tips-N'-Tricks.md index ef085069ab..8466ca9d87 100644 --- a/share/doc/homebrew/Tips-N'-Tricks.md +++ b/share/doc/homebrew/Tips-N'-Tricks.md @@ -27,6 +27,15 @@ This can be useful if a package can't build against the version of something you And of course, you can simply `brew link $FORMULA` again afterwards! +## Activate a previously installed version of a formula + +```sh +brew info $FORMULA +brew switch $FORMULA $VERSION +``` + +Use `brew info $FORMULA` to check what versions are installed but not currently activated, then `brew switch $FORMULA $VERSION` to activate the desired version. This can be useful if you would like to switch between versions of a formula. + ## Install into Homebrew without formulas ```sh