[Homebrew] Remove packages and unused dependencies to free up spaces

I use my MacBook everyday to work on development and I use Homebrew to manage the packages on it. They work fine throughout the days but it’s such a plain to free up spaces on my machine by removing the packages I don’t need anymore.

If you’re a developer who use macOS as your daily driver, you probably familiar with Homebrew and understand my plain. For those of you who don’t know what’s Homebrew, ~~you could just skip the rest of this~~ it’s the most common, and probably the best package manager on macOS.

The only thing is lacking on Homebrew is the ability to auto remove the unused dependencies. There isn’t any official way to do the clean up. You might end up having lots of unused dependencies remain in you machine and take up a lot of storage. And trust me, you don’t want to remove those dependencies one by one manually or by using a set of commands to clean them up. Therefore we need a simple and elegant solution to get the job done. rmtree is what I’ve found for this purpose.

Continue reading “[Homebrew] Remove packages and unused dependencies to free up spaces”