Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daviderestivo/80904d1da6271664737cc3376fba0463 to your computer and use it in GitHub Desktop.
Save daviderestivo/80904d1da6271664737cc3376fba0463 to your computer and use it in GitHub Desktop.
How to install an old version of a brew formula
```
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
git log --oneline imagemagick@6.rb
7fbfe5b80 imagemagick@6: update 6.9.9-15 bottle.
e350b9b9b imagemagick@6 6.9.9-15
1b98748c9 imagemagick@6: update 6.9.9-14 bottle.
3075a3186 imagemagick@6: update 6.9.9-14 bottle.
c52c493a1 imagemagick@6 6.9.9-14
a03627c39 imagemagick@6: update 6.9.9-12 bottle.
d1b13e885 imagemagick@6: update 6.9.9-12 bottle.
0268fa9dc imagemagick@6 6.9.9-12
3fd7a855a imagemagick@6: update 6.9.9-11 bottle.
```
Checkout the version you want to install:
```
git checkout a03627c39
brew install imagemagick@6
brew pin imagemagick@6
git reset --hard
```
Brew tells us that the formula has been pinned to 6.9.9-12 and that a
new formula is available (6.9.9-15):
```
brew info imagemagick@6
imagemagick@6: stable 6.9.9-15 (bottled) [pinned at 6.9.9-12, keg-only]
Tools and libraries to manipulate images in many formats
https://www.imagemagick.org/
/usr/local/Cellar/imagemagick@6/6.9.9-12 (1,469 files, 22.5MB)
Poured from bottle on 2017-09-30 at 21:16:40
```
If we run an update/upgrade brew will inform us that since
imagemagick@6 has been pinned it will not be upgraded:
```
brew update
Already up-to-date.
brew upgrade
==> No packages to upgrade
==> Not upgrading 1 pinned package:
imagemagick@6 6.9.9-15
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment