Something like pip-tools for homebrew?

154 Views Asked by At

When you install something with homebrew, it also installs the dependencies, which is fine. But later, when you deinstall this specific item, the dependencies remain installed. So by time, you have a lot of software installed and don't know why.

For pip, where the situation is similar, there are solutions like pip-tools. You have to curate a list with the packages you want (requirements.in) and with pip-compile you get the list af all packages, including the dependencies (requirements.txt). When you delete an entry in the requirements.in and re-compile, the dependencies also vanish in requirements.txt, as long as they aren't needed for something else.

I wonder if there's something similar for homebrew?

1

There are 1 best solutions below

0
On

Here’s command to list unused dependencies:

$ brew leaves --installed-as-dependency

Or:

$ brew autoremove --dry-run

To uninstall them:

$ brew autoremove