There is at least three different ways package versions are supported by Homebrew.
1) With brew switch
, you can switch back to a version of a package you already installed. For example typing brew switch ansible
, I obtain:
ansible installed versions: 2.7.5, 2.7.6
using brew switch ansible 2.7.5
, I can switch back to an old version, but this works only for versions that have been already installed.
2) With versioned formulas, you can choose an old version of MySQL with brew install mysql@5.5
or brew install mysql@5.6
. This works because there is the corresponding formulas: mysql@5.5.rb and mysql@5.6.rb.
3) You can use the git history to go back to any version of a formula, read this question/answer for details: Install older version of Pandoc (<2) using homebrew