Remove all installed packages and ports on FreeBSD

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.
  1. % su
  2. # pkg_delete -f -a
  3. # rm -rf /var/db/pkg /usr/local
We've started by using pkg_delete to remove all packages and finished by deleting every traces of them in the system.