MacPorts

List Ports

list requested ports:

port echo requested | cut -d ' ' -f 1 | uniq

list installed ports:

port -qv installed

Housekeeping

When ports are updated, the old port is only deactivated, not uninstalled:

...
autoconf                       @2.69_2 
autoconf                       @2.69_3 
autoconf                       @2.69_5 
...

You can see a list of all installed ports:

port echo installed

After you run MacPorts for a while, you will see a lot of duplicate ports. You can clean these:

sudo port uninstall inactive