This post provides the steps required to remove every installed package and port on a FreeBSD system. By following the bellow steps you'll end up with a barebones system composed by FreeBSD's userland and kernel without any third party applications.
% su
# pkg_delete -f -a or pkg del -f -a
# rm -rf /var/db/pkg /var/db/ports /usr/local
We've started by using pkg_delete to remove all packages and ports and finished by deleting every traces of them in the system (including ports selected build options).