Starting again from base system

After building and installing numerous packages, I seem to have created a bit of a mess so would like to start again from the base build.

How do I delete all built ports and installed pkgs?
 
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.

I think that will only work for FreeBSD versions < 10-* due to the old pkg tools being removed in 10-RELEASE if I'm not mistaken.The portmaster(8) man page section might need to be updated to reflect the new pkg framework if so.
 
The fastest and cleanest way: rm -fr /var/db/pkg /var/db/ports /usr/ports /usr/local

Note 1: remove the paths you don't want to clean (duh).
Note 2: be very careful when you type the command; you don't want spaces in the wrong places.
 
Back
Top