Install an old version with homebrew for macOS · GitHub
Posted by jpluimers on 2025/01/21
Fork of a repository that shows how to do this with normal Homebrew installs [Wayback/Archive] Install an old version with homebrew for macOS · GitHub has my notes to do a similar thing with Homebrew cask installs.
Fork of: [Wayback/Archive] Install an old version with homebrew for macOS · GitHub.
TODO: check notes to ensure they really work on a different system and were not a lucky shot.
Notes:
For casks, steps based on [Wayback/Archive] homebrew – How do you specify a version using brew cask? – Stack Overflow
Cask example: beyond compare where I wanted version 4
Find the ruby file in the casks at [Wayback/Archive] homebrew-cask/Casks at master · Homebrew/homebrew-cask · GitHub or via
In this case [Wayback/Archive] homebrew-cask/Casks/b/beyond-compare.rb at master · Homebrew/homebrew-cask · GitHub
with raw source at [Wayback/Archive] raw.githubusercontent.com/Homebrew/homebrew-cask/refs/heads/master/Casks/b/beyond-compare.rb
Click on History go get to the commits for
beyond-compare.rbfileIn this case: [Wayback/Archive] History for Casks/b/beyond-compare.rb – Homebrew/homebrew-cask · GitHub
Find the most recent commit before the next version you don’t want (we want the most recent 4.x which was
4.4.7.28397, so we get the commit just before the oldest 5.x which was5.0.0.29773)In this case: [Wayback/Archive] beyond-compare: add rosetta caveat · Homebrew/homebrew-cask@7c66c95 · GitHub
caveats do requires_rosetta endThis mase Beyond Compare 4 installed via brew able run on Apple Silicon, see [Wayback/Archive] Avoid outputting Rosetta 2 caveats on Intel machines · Issue #18365 · Homebrew/brew · GitHub and [Wayback/Archive] brew/Library/Homebrew/cask/dsl/caveats.rb at 29c22e0ab3fd9826cefd4b14c143266dea3bc391 · Homebrew/brew · GitHub:
caveat :requires_rosetta do next if Homebrew::SimulateSystem.current_arch != :arm <<~EOS #{@cask} is built for Intel macOS and so requires Rosetta 2 to be installed. You can install Rosetta 2 with: softwareupdate --install-rosetta --agree-to-license Note that it is very difficult to remove Rosetta 2 once it is installed. EOS endView the pretty-printed ruby file
beyond-compare.rbIn this case: [Wayback/Archive] homebrew-cask/Casks/b/beyond-compare.rb at 7c66c9516038b2d4a7d543340b0905f9fba0e439 · Homebrew/homebrew-cask · GitHub
Click on the “RAW” button to view the RAW file
In this case [Wayback/Archive] https://raw.githubusercontent.com/Homebrew/homebrew-cask/7c66c9516038b2d4a7d543340b0905f9fba0e439/Casks/b/beyond-compare.rb
Download this file locally:
curl --remote-name https://raw.githubusercontent.com/Homebrew/homebrew-cask/7c66c9516038b2d4a7d543340b0905f9fba0e439/Casks/b/beyond-compare.rbInstall that one using prefix
brew install --cask beyond-compare.rb
Query: [Wayback/Archive] brew caveats do require_rosetta – Search on Google
--jeroen






Leave a comment