Page History

Homebrew

Nigel Stanger edited this page on 16 Mar

Clone this wiki locally

Downgrading to an older version of a package

If the older version happens to still be locally available (true until Homebrew does one of its periodic cleanups), it will appear in brew info <package> and you can just brew install the locally available version directly.

Otherwise, you have to create a local tap for the older package version and install that. These instructions seem to be reasonably up to date.

  1. Find the package formula in the homebrew-core tap:

    brew tap-info homebrew/core
    cd <homebrew prefix>/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  2. If you don’t already know which version you want, look in the commit log for the package formula:

    git log <package>.rb
  3. Create new local tap and extract the package version to it:

    brew tap-new $USER/local-<package>
    brew extract --version=<version> <package> $USER/local-<package>

    Watch out for weird dependency issues—you might need to edit the extracted <package>@<version>.rb (which should be in /usr/local/Homebrew/Library/Taps/$USER/local-<package>/Formula).

  4. Install as usual using the new tap (obviously uninstall the currently installed version first):

    brew install <package>@<version>