How to downgrade hugo to a previous version?

TLDR: Use something other than Homebrew

Only a few of the Homebrew packages have version-specific formulae. See this list. Go, for example, has version-specific formulae, but Git does not.

If someone had the time and inclination, they could submit version-specific formulae for Hugo, but those formulae are subject to these restrictions. Most notably:

Versioned formulae should differ in major/minor (not patch) versions from the current stable release

That means that we could have formulae for v0.101.0 and v0.102.0, but not for v0.102.1, v0.102.2, or v0.102.3.

I agree.

The current version of Homebrew is v3.6.0. The switch command was removed in v2.6.0. Prior to v2.6.0, provided you had not run brew cleanup, you could easily revert to an earlier installation with something like:

brew switch hugo 0.102.1

But you can’t do that anymore.

I spent far too much time researching methods to install a specific version via Homebrew when the package does not have version-specific formulae. This looked promising, but threw an error.

This is the best method that I can find so far:

  1. Uninstall the current version with brew uninstall hugo

  2. Visit https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/h/hugo.rb

  3. Click the “History” link

    Screenshot 2026-01-07 at 11.46.47 AM

  4. Find the “bottle” commit for the desired version (example: hugo: update 0.99.1 bottle)

  5. Press the “Download raw file” button

    Screenshot 2026-01-07 at 11.49.46 AM

  6. Save hugo.rb to any directory (home, downloads, etc.)

  7. Open a terminal

  8. CD into the directory where you saved the hugo.rb file

  9. Install with HOMEBREW_DEVELOPER=true brew install hugo.rb

  10. Prevent automatic updates with brew pin hugo

Compare that with building from source:

# Install the latest version
go install -tags extended github.com/gohugoio/hugo@latest
# Downgrade to something else
go install -tags extended github.com/gohugoio/hugo@v0.100.1

The first time you build from source, it will take a minute or two as Go primes the module cache. Subsequent builds will generally be much faster.


EDIT 2026-01-07T11:41:11-08:00: Updated the procedure above.

8 Likes