Installing old Homebrew formulas

Josua Schmid
2 min readJan 11, 2019

Homebrew is a handy package manager for Mac OSX. You can easily install software the “apt-get install”-way by executing short commands in your terminal, like brew install kubernetes-helm. Updating then happens with brew upgrade kubernetes-helm.

Now, what if I want to install a certain specific version of a package? If the version is not provided by the newest formula (installable for example via brew install qt@5.5), there’s no obvious way to do so. If you read a bit about the command line synopsis you’ll find out, that you cannot only install packages via the official formulas but also by supplying a formula URL directly to the install command.

So you can actually look for the old formula at the official Homebrew formula repository on Github (or somewhere else) and install it directly via:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/baac18f6c73c6a8dd229683fb0945aebc30a37e7/Formula/kubernetes-helm.rb

Once installed you can easily switch the used version to the one you want to use locally:

brew switch kubernetes-helm 2.9.1

And pin it, so that it doesn’t get updated when you type brew update (which updates everything):

brew pin kubernetes-helm

Be careful with pinning

You may miss updates…

Generally be careful with using outdated formulae. They’re outdated for a reason. There could well be security flaws with the version you pinned.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Josua Schmid
Josua Schmid

Written by Josua Schmid

I engineer software and craft beer, or the other way around. Find my old blog here: https://web.archive.org/web/20181108025110/http://blog.schmijos.ch/