It turns out that there is a way to keep the installation clean all the time. If you run the command
sudo port -nuf upgrade outdated
in a command shell, MacPorts will uninstall any outdated versions of any packaged it upgrades. We do need to force (-f) the installation, as MacPorts believes that you need the old versions. When checking for dependencies, it does not take the version into account. Since we are installing a new version, this is OK.
UPDATE: jmr pointed out in a comment that it is no longer necessary to the "nf" flags, as the bugs that made them necessary have been fixed. See his comment for more details.