On Dec 10, 2013, at 05:40, Federico Calboli <f.calb...@gmail.com> wrote:

> On 10 Dec 2013, at 11:28, Ryan Schmidt <ryandes...@macports.org> wrote:
>>> I have thus far failed to get rid of them, and get rid of any leftover crud 
>>> left by their configuration.  I'd be obliged if someone could tell how to 
>>> do that -- I like to run a tight ship.
>> 
>> You can uninstall them this way:
>> 
>> sudo port uninstall gmp @5.0.5_0 py27-nose @1.2.1_1
>> 
>> Or if you want to get rid of all inactive ports you can use:
>> 
>> sudo port uninstall inactive
> 
> That worked, and seems reasonably obvious -- enough at least to make me feel 
> quite stupid for not having figured it out myself.

Don’t worry; we have too many different sources of documentation and it’s hard 
to keep up with them all. “inactive” is what we call a pseudo-portname, which 
evaluates to a set of ports that can vary based on your installation. Other 
pseudo-portnames that do what they sound like include “all”, “active”, 
“installed”, “outdated”, “requested”, and “unrequested”. Pseudo-portnames are 
documented in the port(1) manpage.

You can use these pseudo-portnames with any MacPorts commands where you would 
use actual port names, though some pseudo-portnames fit better with some 
commands than others. For example it’s unlikely you’d want to install all 
17,000+ ports with “sudo port install all”, however you might want to clean all 
ports with “sudo port clean all”. Using the “installed” pseudo-portname with 
the “installed” command (“port installed installed”) is redundant, but using 
the “actinact” pseudo-portname with it (“port installed actinact”) can be 
informative (shows you ports you’ve installed that have both an active and at 
least one inactive version).

Another interesting pseudo-portname is “leaves”, which is the set of ports that 
were both not requested by you and are not needed by any other port; these are 
often good candidates for uninstalling (with “sudo port uninstall leaves”). 
Note two caveats:

* Leaves include build dependencies. So even if a port is not required to run a 
port, it may be required to build it, so next time you upgrade a port it may 
need to reinstall such build dependencies.

* Programs or libraries installed by some ports may inadvertently link to 
libraries they shouldn’t. This would be a bug, but MacPorts is not free of 
bugs. It is possible that a program you use has inadvertently linked with a 
library that is a leaf; uninstalling that leaf would cause the program to fail 
because it cannot find the library. If you encounter this situation, please 
file a bug report so that we can decide how to fix it: either by adding a 
dependency on the opportunistically-linked library, or by forcing the program 
not to use the library.

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to