brew 删除包和所有的依赖项

the Homebrew team added a simple command brew autoremove to remove all unused dependencies.

First, uninstall the package:

brew uninstall <package>

Then, remove all the unused dependencies:

brew autoremove

推荐阅读更多精彩内容