Skip to content

Instantly share code, notes, and snippets.

@ronny
Created July 3, 2018 04:39
Show Gist options
  • Save ronny/5d1c23cbe2618e0b93569dc8bc6ba8af to your computer and use it in GitHub Desktop.
Save ronny/5d1c23cbe2618e0b93569dc8bc6ba8af to your computer and use it in GitHub Desktop.
brew pin an older version

This is handy if you have already upgraded and cleaned the older version from the Cellar.

Uninstall the latest version:

brew uninstall kubernetes-cli

Find the git SHA1 for the version that you want, then find the raw link from github, and install from it:

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

Pin the version:

brew pin kubernetes-cli

Verify:

brew list --pinned
brew outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment