Look into the -o option in portupgrade as well as portmaster. Mind you: there's a difference between downgrading a port (only the newest version exists in the ports tree, because it has replaced the older version), and reverting to a previous version which is also still in the ports tree. Bash still has v3 (shells/bash3) and v4 (shells/bash) existing together, so a 'make deinstall' in one ports dir (or a pkg_delete -f of the installed port) and a 'make install' in the other ports dir should still work. And, as stated, portupgrade/portmaster -o should be able to do this in one go.