Remove "Phantom" Ports

James Secan james.secan at
Thu Mar 10 23:29:31 UTC 2022

Good point.  I set up my routine upgrade script many years ago, before I understood much about how MacPorts (and port) works.  While fixing this disconnect I found a couple of other usages that weren’t quite what I wanted.

3222 NE 89th St
Seattle, WA 98115
(206) 430-0109

> On Mar 10, 2022, at 12:34 AM, Ryan Schmidt <ryandesign at> wrote:
> On Mar 9, 2022, at 17:13, James Secan wrote:
>> when I run "port upgrade installed -u outdated”
> This command doesn't make a great deal of sense. You're asking MacPorts to upgrade the "installed" ports (which includes those those that are outdated and those that aren't) and also the "outdated" ports (those that are outdated). It would be simpler and more efficient to just run "sudo port -u upgrade outdated". Single-dash/single-letter flags like "-u" go after "port" and before the action (the action in this case being "upgrade").
> For completeness, "-u" means "uninstall inactive ports"; if you want to keep inactive ports, for example as a safeguard so that you could return to them in case something is wrong with the new version, then don't use "-u". When you eventually run "sudo port reclaim", that will get rid of the inactive versions.
> MacPorts reminds to run "sudo port reclaim" if you have not done so in a few weeks, unless you have configured MacPorts not to remind you.

More information about the macports-users mailing list