Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active May 28, 2025 14:43
Show Gist options
  • Save Integralist/36dcf9fa921f6caa58990525e474d1a3 to your computer and use it in GitHub Desktop.
Save Integralist/36dcf9fa921f6caa58990525e474d1a3 to your computer and use it in GitHub Desktop.
Homebrew: custom version install #homebrew #macOS

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment