asteriskRoss said:The ports-mgmt/portmaster tool has a procedure for doing this, described in the portmaster(8) man page. Look in the examples section at "Using portmaster to do a complete reinstallation of all your ports". If you simply want to remove all ports and not reinstall then you can stop before reinstalling ports-mgmnt/portmaster.
pkg delete -a.balanga said:If I delete mysql-server, how do I delete any databases which may have been created previously?