Execute "portsreinstall" to start entire reinstallation of the ports.
If you are using portupgrade with configured pkgtools.conf, execute "portsreinstall -p" instead. If you end up with reports on failed ports, execute "portsreinstall redo" to restart the reinstallation.
If you end up with failed ports again, resolve the problems manually and then execute "portsreinstall ok add port_glob", where port_glob is the origin or package/port name pattern of the resolved port.
Then execute "portsreinstall redo" again.
Continue this procedure until the fully successful end.
Then finally execute "portsreinstall clean". Anytime you want to interrupt the job, hit "CTRL+C".
Then anytime you want to restart the job, execute "portsreinstall" with no argument or option. A short help is shown by executing "portsreinstall -h".
More detailed documents are shown by "man portsreinstall" or "portsreinstall -H".