how do I de-install all the ports on my system?

I upgraded from 8.0 to 8.2. reading the freebsd-update procedure in the Handbook it says you either need to rebuild or re-install all the third party software on the system since that software may depend on libraries which have been removed during the upgrade process. I wanted to just de-install all the software on my pc since I have a lot of packages I don't need. How do I do this?
 
Make a list of everything that's installed first:
# pkg_info > /root/packagelist.txt

Then deinstall all the packages:
# pkg_delete -a
 
wblock said:
Make a list of everything that's installed first:
# pkg_info > /root/packagelist.txt

Am I wrong for thinking that will list all extraneous software installed - be from packages or ports?

I was under the impression that "pkg_" programs dealt with packages (binaries) and that "port*" programs dealt with ports (3rd party stuff - which is what the OP is after).
 
A package is what you get from building a port. Yes, pkg_info -a will list everything that's been installed. That's so you can go back later and see what you had installed. Not required, just handy to have.
 
OH, I see now. I thought there was some implicit relationship between the two commands. pkg_delete -a actually removes everything. That's got to be handy sometime.
 
You may need pkg_delete -af to prevent running into errors about packages that are depended on by not yet removed other packages. Not sure if pkg_delete -a sorts this out before actually removing stuff.
 
I simply backup my local etc and then
Code:
# rm -Rf /usr/local/*
# rm -Rf /var/db/pkg/*

and since I have also texlive installed this is much, much faster than pkg_delete
 
That's correct, but be sure to save anything that was customised in /usr/local/etc/. Would be a pity to lose that difficult configuration you spent days on ..
 
Back
Top