One way
1) Generate a list of manually installed packages leaving out the dependencies
$ pkg_info -m > pkgs.txt
2) Delete all installed packages
# pkg_delete /var/db/pkg/*
3) You may need to edit your pkgs.txt if there have been interim updates/patches. Here is an example:
Code:
cabextract-1.5p0 extracts files from Microsoft CAB archives
to
If you use the vi editor, "D" (delete from cursor to end of line) works wonderfully for this.
4) Re install the packages from pkgs.txt
Code:
pkg_add -l pkgs.txt