After running brew upgrade
, you may notice some casks you think should be upgrading, aren鈥檛.
As you鈥檙e likely aware, a lot of macOS software can upgrade itself:
That could cause conflicts when used in tandem with Homebrew Cask鈥檚 upgrade
mechanism.
If you upgrade software through it鈥檚 built-in mechanism, that happens without Homebrew Cask鈥檚 knowledge so both versions get out of sync. If you then upgraded through Homebrew Cask and we have a lower version on the software on record, you鈥檇 get a downgrade.
There are a few ideas to fix this problem:
- Try to prevent the software鈥檚 automated updates. That won鈥檛 be a universal solution and may cause it to break. Most software on Homebrew Cask is closed-source, so we鈥檇 be guessing. This is also why pinning casks to a version isn鈥檛 available.
- Try to extract the installed software鈥檚 version and compare it to the cask, deciding what to do at that time. That鈥檚 a complicated solution that breaks other parts of our methodology, such as using versions to interpolate in
url
s (a definite win for maintainability). That solution also isn鈥檛 universal, as many software developers are inconsistent in their versioning schemes (and app bundles are meant to have two version strings) and it doesn鈥檛 work for all types of software we support.
So we let software be. Installing it with Homebrew Cask should make it behave the same as if you had installed it manually. But we also want to support software that does not auto-upgrade, so we add auto_updates true
to casks of software that can do it, which excludes them from brew upgrade
.
Casks which use version :latest
are also excluded, because we have no way to track the version they鈥檙e in. It helps to ask the developers of such software to provide versioned releases (i.e. have the version in the path of the download url
).
If you still want to force software to be upgraded via Homebrew Cask, you can:
- Reference it specifically in the
upgrade
command:brew upgrade {{cask_name}}
. - Use the
--greedy
flag:brew upgrade --greedy
.
Refer to the upgrade
section of the brew
manual page by running man -P 'less --pattern "^ {3}upgrade"' brew
.