Skip to content

Instantly share code, notes, and snippets.

@mikybars
Last active February 28, 2020 10:09
Show Gist options
  • Select an option

  • Save mikybars/d9744628273f7c7de6ecbb9a5803d151 to your computer and use it in GitHub Desktop.

Select an option

Save mikybars/d9744628273f7c7de6ecbb9a5803d151 to your computer and use it in GitHub Desktop.
Rollback to a previous Homebrew formula version

Source: https://medium.com/@schmijos/installing-old-homebrew-formulas-dc91de0c329c

  1. Open the GitHub page for the formula:
$ brew info --github awscli
  1. Click on History.
  2. Locate the commit with the version required and click on it.
  3. Locate the file awscli.rb, click on ... and View file.
  4. Click on Raw and copy URL.
  5. Install formula:
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/497b20ccc30e674a22dd3f5efb9abcae162f8972/Formula/awscli.rb

We may have to unlink the current version first:

$ brew unlink awscli
  1. Check installation:
$ brew ls --versions awscli
awscli 2.0.0 1.17.10
  1. Switch to the new version:
$ brew switch awscli 1.17.10
  1. Check versions:
$ aws --version
aws-cli/1.17.10 Python/3.8.1 Darwin/19.3.0 botocore/1.14.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment