Remove "Phantom" Ports

Joshua Root jmr at macports.org
Thu Mar 10 04:29:30 UTC 2022


James Secan wrote:

> I have a number of apparently old/replaced ports (p5.26-*) that have been replaced at some point by their p5.28-* updates that are still in some way “alive” on my system.  They show up when I run "port upgrade installed -u outdated” as follows:
>
> Warning:  No port p5.26-xxxx found in the index
>
> I’ve tried various ways to get rid of these phantoms, but nothing I’ve tried (like a simple port uninstall) is willing to admit that any p5.26-* ports are around, although a ‘port installed’ command will list all of them and note that they are active.  I am by no stretch an expert in portsmanship, so I could easily be missing some simple answer.

These are indeed ports that are installed but are no longer present in 
the ports tree. You can refer to all such ports using the 
pseudo-portname 'obsolete', for example:

port echo obsolete

port uninstall obsolete

Note that this could potentially also match ports that you still want, 
since any ports installed directly from a portfile that is not part of a 
tree listed in sources.conf will be in exactly the same situation. So 
check the echo output before proceeding.

A normal 'port uninstall <portname>' will work on such ports. Without 
seeing a terminal transcript, my suspicion would be that a typo may have 
been the reason your uninstall didn't work. If it's really not possible 
to run uninstall on such a port, that is of course a bug, so please file 
a ticket if that's the case.

- Josh



More information about the macports-users mailing list