How to install an older Hugo version from snap in ubuntu?

Because of this issue, how to install an older version of Hugo from snap packages? Also from --channel=extended.

The whole idea of a snap package is that it is always up-to-date. I don’t think that you can downgrade it.

Just remove the snap from your system and then install the binary of the older Hugo version that you need (until said bug is fixed).

Apart from the “why” the “how” is here:

Other sources tell you to download the snap package from the store and then install locally and then lock so it does not get updated. But that seems like a lot of work.

That’s interesting. I have never tried installing snap packages by specific version. Thank you for the heads up.

But since the snap will auto-update itself at some point -and locking it is hard work as you say- isn’t simpler to just install the desired Hugo binary in the use case of the original poster?

Yes it surely is, if it works. Snap is often hated by Ubuntu users, hehe.

I’m going to stick with the binaries. The snap option is too complicated, tried but was not able to make it work. I tried to go with a nodejs option instead of Hugo for my project to avoid that issue with code blocks, but after installing those endless dependencies, above 500mb… wow, I stopped in that point and back to hugo.