« Back to Index

Homebrew: custom version install

View original Gist on GitHub

Tags: #homebrew #macOS

README.md

You can’t install specific package versions using Homebrew.

If you have a version installed you can pin it:

brew pin <package>

That will prevent a brew upgrade from updating the package.

But this doesn’t help if you’ve already upgraded a package and then discovered that you need an older version.

To do that:

  1. Download the older Brew script, e.g. helm version 3.17.3: https://github.com/Homebrew/homebrew-core/blob/14e5c24f9bb081fe3cd5ad595f518edc28955473/Formula/h/helm.rb
  2. HOMEBREW_NO_AUTO_UPDATE=1 brew install /tmp/helm.rb