Installing an older version of a Homebrew package is a pain.
The simplest way I found to install is to grab a URL from Github for a specific version and install that via brew install
.
The problem was that when I wanted to find the URL for a specific version, Github always just timed out.
To overcome this problem, I just checked out the repo locally and looked up the history that way. This was a good enough reason for me to make a project out of this, so I decided to index the whole thing and put a UI in front of it.
Fun fact: only after completing the project I realised there is an other way of getting to a specific version of a package.
zsh
)brew install URL
For example if you want to install version 5.6.2 of zsh
run:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4d602d14761390efaa08c262735b43601cfe229a/Formula/zsh.rb
This technique will only work, if the version you want to install is not an ancient one. The reason for that is because each version of a package is installed by executing a Ruby script. As Homebrew's core evolves, so does the version installer scripts. If you try to install a too old version, the Ruby script might no longer be valid in the newer world of Homebrew core.
If you already have the package installed on a different version, you will need to unlink it first: brew unlink zsh
and then you need to switch to the new version: brew switch zsh 5.6.2
Index last updated at Homebrew/homebrew-core@4050d7c