This example uses istioctl as the formula, but this may come in handy for kubernetes-cli, kubernetes-helm, etc.
- Find the formula for your executable, e.g.
istioctl, and click on the link to GitHub:brew info istioctl | grep Formula - Click "Blame" button ("History" will be too large to display).
- Hopefully, you can find an earlier versioned commit message... click on it.
- Click
...in upper-right of next page, select "View File" from drop-down. - Right-click "Raw" button, and Copy URL Address.
- Paste URL into install command, which will look something like:
brew install https://github.com/Homebrew/homebrew-core/raw/af5f8075d6c64e555812ce818e1d52fe0613b030/Formula/istioctl.rb - If all goes well, you should be able to switch between versions. Use this command fragment to find available versions:
brew switch istioctl - Use complete command to relink and switch to using that version:
brew switch istioctl 1.0.5
Found this alternative which is more compatible with my brew version(recent):
https://cmichel.io/how-to-install-an-old-package-version-with-brew/