How to install an older version of the Homebrew package

Using Homebrew to install older versions of certain packages may be more complicated than you might expect

I ran into this problem: I updated Hugo, which is the CMS I use, and one of the versions that is newer than the version I use introduced major changes.

My homepage no longer lists blog posts. I don't have time to figure it outwhy, So I said "I will roll back".

Now the question becomes... "What's the matter?"

First, I uninstalled Hugo:

brew unlink hugo

Then I followed the instructions I foundThis post. I had to look for the recipe of the Hugo bag I clicked on the file (Formula/hugo.rb), and then click the "History" button to view all previous versions.

Navigate to the 0.53 version I want and click<>Button to viewhomebrew-coreThe repository at the time. Then i openFormula/hugo.rbFile and clickRawGet the direct URL of the file.

I then use it as a parameterbrew install. E.g:

brew install

That's it.

The next step in solving the problem I encountered was to uninstall the currently installed version and try to update one version at a time so that I could isolate the release that introduced the changes that caused my problem.