Uninstall a port and ONLY THAT PORT's dependencies?

Ryan Schmidt ryandesign at macports.org
Sun Oct 1 16:57:07 UTC 2017


On Oct 1, 2017, at 05:50, Carlo Tambuatco wrote:

> Is there a way to uninstall a port and only those ports that are dependencies of just that port?
> 
> So I want to uninstall port A and dependencies of A: dep(A) but not dep(A,B,C,…) where 
> dep(A,B,C…) are dependencies of A and B and C, etc…

Not particularly.

What you can do is uninstall port A.

Then you can run "port installed leaves" to show a list of the ports that are installed but that you have not requested. (If the list is inaccurate -- if ports are on the list that you actually want -- you can tell MacPorts by using "sudo port setrequested X" where X is the port you want to keep.) Then, once "port installed leaves" correctly represents the list of ports you don't want, you can uninstall them with "sudo port uninstall leaves".

You may need to repeat this several times, until the list is empty.



More information about the macports-users mailing list