How to install old version of cask?

I’m trying to downgrade to an older version of a cask (calibre). The most recent (unofficial) instructions I could find recommended pointing to the (raw) commit, ie:

brew cask install "https://raw.githubusercontent.com/Homebrew/homebrew-cask/c7d49baf9a6812cc6c4e84fec296d6647ea814d8/Casks/calibre.rb"

but that generates a curl error, which led me to an issue comment stating that brew doesn’t accept commits (any more?). Is there a way to achieve this goal?

Thanks!

Why use brew cask to install an older version, when brew will just try to update it next time it runs?

If you want to stick with an older version, wouldn’t it make more sense to just download and install the version you want?

Yes, what I want is to install an older version and then pin it. However, there is no older version of this cask available (via brew search calibre) so I want to find out how to (using brew) install an older version (specifically: 3.47.1) so that I can then pin it.

I guess I’m asking: re. “just download and install the version you want” - how do I do that?

I don’t think it can be done via brew
but I googled ‘calibre older version’ which led me to
https://download.calibre-ebook.com which led me to
https://download.calibre-ebook.com/3.html

According to that page, version 3.47.1 can be downloaded from https://download.calibre-ebook.com/3.47.1/

:tada:

Thanks for confirming: that was my impression too. I didn’t want to have to remove calibre from homebrew control but I guess that’s the only way!