Search code examples
macosversionhomebrewupgradehomebrew-cask

Update Homebrew casks versions


I know, that Homebrew doesn't upgrade casks with auto-update (without force). So eventually, software versions, actually installed, and tracked by Homebrew, become different. For example:

$ brew cask outdated --greedy
firefox (79.0) != 80.0
google-chrome (84.0.4147.105) != 85.0.4183.83
microsoft-edge (84.0.522.48) != 85.0.564.41

Firefox, Chrome and Edge auto-updates themselves and actually has latest versions. But Homebrew doesn't know about it.

So, is there a way to tell Homebrew, that some cask is the latest version already, without reinstalling cask with brew? Just update record in Homebrew database (or whatever brew stores casks' versions in).


Solution

  • Apparently, there is no official way to do it.

    Following related GitHub conversation I wrote my own script to fulfil my obsession of checking versions :)

    If anyone wants to use it — use it on your own risk, you will get no support for issues that arise from this approach. Also, I tried to make neat and robust script, which backups data, but if script will remove any of your data — I'm not responsible for that. I encourage you to read the script and understand, what it is doing.