Keep homebrew up to date

Published on Apr 1, 2023

1 min read


I've been using homebrew for as long as I can remember using macOS. I recently learned about cleaning up old and outdated files using the brew cleanup command.

Sometimes, I periodically upgrade packages that are installed using brew. Thus, I thought, why not add an alias such as below in my .zshrc file:

alias hbc="brew update && brew upgrade && brew cleanup"

This helps me to update and upgrade outdated packages, and clean up old files. Now, whenever I have to run all three tasks, I simply run hbc in the terminal.

Upgrading outdated packages periodically saves me from a situation when installing a new package, homebrew will upgrade all outdated packages first.

More Posts

Browse all posts

Aman Mittal author

I'm a software developer and a technical writer. On this blog, I write about my learnings in software development and technical writing.

Currently, working at Expo. Previously, I've worked as a Developer Advocate at Draftbit, and Senior Content Developer at Vercel.

Copyright ©  2019-2023 Aman Mittal · All Rights Reserved.