I was chatting with a coworker the other day about a security patch to Ruby when I mentioned in passing that I update my Homebrew packages daily. Apparently—based on his reaction—this might make me a bit of on outlier. While I might border on compulsive with this upgrading stuff, I still think it’s a good idea and that you should do it too.
Sure, my development machine isn’t quite the target that a production server is, but that doesn’t mean I’m ok with being hacked. This is my stuff, man! Plus being up-to-date increases the likelihood of niggling bugs being fixed. And if you worry about problems during an upgrade just remember: upgrading is like deploying—the more often you do it the simpler each time is.
This advice holds true regardless of which package management system you prefer and they all try to make the process as easy as possible. If you use Homebrew like me it’ll only take you two or three quick steps.
1) brew update
Update your local cache of package names and version numbers.
2) brew outdated (optional)
See a list of package you have install that are out of date. Technically this is completely optional, but come on, we’re all nerds here, right? We want to know what’s happening with our computers at all times.
3) brew upgrade --all
Upgrade all of your outdated packages. Of course you always have the option of selecting only some to update. Note: keep an eye on the notes in the log from this in case there are any follow-up tasks that you need to attend to.
It’s as simple as that! Once you get in the habit this will take seconds a day and the upgrades can just happen in the background. So join me in keeping our machines safe and up-to-date, won’t you?