The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,859 other subscribers

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

  1. Find the ruby file in the casks at [Wayback/Archive] homebrew-cask/Casks at master · Homebrew/homebrew-cask · GitHub or via

    [Wayback/Archive] beyond-compare — Homebrew Formulae

  2. 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

  3. Click on History go get to the commits for beyond-compare.rb file

  4. In this case: [Wayback/Archive] History for Casks/b/beyond-compare.rb – Homebrew/homebrew-cask · GitHub

  5. 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 was 5.0.0.29773)

  6. In this case: [Wayback/Archive] beyond-compare: add rosetta caveat · Homebrew/homebrew-cask@7c66c95 · GitHub

    caveats do
      requires_rosetta
    end

    This 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
          end
  7. View the pretty-printed ruby file beyond-compare.rb

  8. In this case: [Wayback/Archive] homebrew-cask/Casks/b/beyond-compare.rb at 7c66c9516038b2d4a7d543340b0905f9fba0e439 · Homebrew/homebrew-cask · GitHub

  9. Click on the “RAW” button to view the RAW file

  10. In this case [Wayback/Archive] https://raw.githubusercontent.com/Homebrew/homebrew-cask/7c66c9516038b2d4a7d543340b0905f9fba0e439/Casks/b/beyond-compare.rb

  11. Download this file locally: curl --remote-name https://raw.githubusercontent.com/Homebrew/homebrew-cask/7c66c9516038b2d4a7d543340b0905f9fba0e439/Casks/b/beyond-compare.rb

  12. Install 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.