I have a Homebrew package that I wish to uninstall / remove with all its dependencies, skipping packages whom other packages depend upon.
e.g. Uninstall package a
which depends on packages b
& c
, where package d
also depends on package c
. The result should uninstall both a
& b
, skipping c
.
How can I do that?
There must be a way to uninstall a package without leaving unnecessary junk behind.
The answer of @jfmercer must be modified slightly to work with current brew, because the output of
brew missing
has changed:The goal here is to remove the given package and its dependencies without breaking another package's dependencies. I use this command:
Note: Edited to reflect @alphadogg's helpful comment.
brew rmtree
doesn't work at all. From the links on that issue I found rmrec which actually does work. God knows whybrew
doesn't have this as a native command.