There are numerous guides for downgrading a Brew package but somehow, none that I tried I found to be particularly helpful, let alone working and straightforward. Thus I mixed and matched them together to build Yet another brew downgrade package guide™, that at least works for my needs. Start by cloning a brew core repository:

git clone

Now get in to correct folder where your expected formula resides, deep inside the letter folder:

cd homebrew-core/Formula/n

Get the correct hash of the commit containing desired version, install tig via brew if missing:

tig neovim.rb

You can either write the short hash manually or you can copy it via the following keybinding, edit ~/.config/tig/config:

bind generic 9 !@sh -c "git rev-parse --short %(commit) | pbcopy"

When on desired commit press 9 and the short commit hash will be in your clipboard. Now checkout that commit, pasting or writing the hash:

git checkout 1a2b3b4d

And herein lies the magic, install the package:

brew install neovim.rb

The last thing you can do is to pin the package:

brew pin neovim

Pinning will prevent upgrading the package again in the future. You can check list of pinned packages via:

brew list --pinned

Now use brew as before, if you want an automatic upgrade of the package, just unpin it:

brew unpin neovim



Make sure to not make a mistake of omitting the .rb extension. Another thing that took me quite q while to figure out was to actually cd into containing folder and not to use any path in brew install, in other words:

git clone
cd homebrew-core
brew install Formula/n/neovim.rb

Above will likely cause a highly confusing error:

==> Tapping formula/n
Cloning into '/opt/homebrew/Library/Taps/formula/homebrew-n'...
Username for '':

The reason for this error is that of course the repository does not exist publicly. If such repository existed the error would likely be different, but I did not get that far. I was able to get a hint of a problem via -dv switch:

brew install -dv Formula/n/neovim.rb

Which produces a little bit more details about the ongoing operation:

/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromTapLoader): loading Formula/n/neovim.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/git --version
==> Tapping formula/n
git clone /opt/homebrew/Library/Taps/formula/homebrew-n --origin=origin --template= --config core.fsmonitor=false
Cloning into '/opt/homebrew/Library/Taps/formula/homebrew-n'...
Username for '':