How do you specify a version using brew cask?

For recent versions of Homebrew, Jethro’ instructions below may not work work, because we will get an error like:

Invalid usage: Non-checksummed download of <FORMULA_NAME> formula file from an arbitrary URL is unsupported.

I found a workaround:

  1. Go to the Homebrew Cask search page:
  2. Type and find the application you are looking for
  3. Click Cask code link
  4. On Github click History button
  5. Find the version you need by reading the commit messages and view the raw file. Confirm the version variable (normally on line 2) is the version you need.
  6. Click on the name of the commit, then three dots and select View file
  7. Right-click Raw button and Save Link As... to download the file locally
  8. When downloaded, go to download directory cd Downloads/
  9. Finally run brew install --cask <FORMULA_NAME>.rb
  10. Voilà 😄

If you need some visual assistance check the screenshots here.

Leave a Comment