list port with no dependents (was: Re: Remove port)

Ryan Schmidt ryandesign at macports.org
Sat Jan 9 16:52:29 PST 2016


On Jan 9, 2016, at 11:38 AM, Eitan Adler wrote:

> On 9 January 2016 at 03:51, Ryan Schmidt wrote:
> 
>> According to port(1) leaves are "installed ports that are unrequested and have no dependents". So if you requested a port, it is by definition not a leaf.
> 
> Ah - I didn't realize that.  a bit of a thread hijack but how would
> one list ports that have zero dependents (requested or not)?

I don't know, but why do you want to know that?

Your installed ports are there either because you requested them (you need and care about these ports), or because something you requested needed them (you indirectly need but don't directly care about these ports), or because they're left over from something that used to be installed that needed them (you don't need or care about these ports).

You're asking if there's a way to list the port you need but don't care about. I'm not sure if there's a command for that.

You can use "port installed requested" to see the list of ports you requested. If anything in the list is not something you actually want, you can mark it as not requested by using "sudo port unsetrequested PORTNAME".

You can use "port installed leaves" to see the list of ports you didn't request that aren't needed by anything. If anything in the list is something you actually want, you can mark it as requested by using "sudo port setrequested PORTNAME".

Finally, you can uninstall the ports you really don't need by using "sudo port uninstall leaves".




More information about the macports-users mailing list