Auto update your brew casks and formulas
If you use the popular Homebrew package manager on MacOS you are very familar with running something similar to this command on a regular basis.
brew update && brew upgrade && brew cleanup
this type of command informs Homebrew to update it’s list of package versions, locate any that need to be updated, and clean up any left over files generated by there processes. If you remember to run this all the time then it is a pretty quick command, but if like me, you forget to do this for weeks or months at a time it can start to take quite some time to finish it’s maintenance.
Yesterday, I was looking into ways to automate this process through adding the command to Cron or to have Cron run a shell script or apple script file with the commands in it. After some quick searching on my search engine of choice, Kagi, I found a great Github project called Homebrew Autoupdate.
The project describes itself thusly.
An easy, convenient way to automatically update Homebrew.
This script will run
brew updatein the background once every 24 hours (by default) until explicitly told to stop, utilisinglaunchd.
brew upgradeandbrew cleanupcan also be handled automatically, but are optional flags.Notifications are enabled by default using a new, code-signed, universal AppleScript applet.
https://github.com/DomT4/homebrew-autoupdate
If you decide to install this project every morning you can look forward to notifications like this.
Do you already use this project? If you tried it, what did you think? Hit me up on Mastodon or my Contact page so we can discuss it or you can ask me any questions you might have.
