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
- # 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).
And that's it!
5 comments:
Good tip, just what I have been searching for!
Glad to help ;)
I would add /var/db/ports/* to the list of things to remove if you want make sure it resets all the dialog boxes for software install. If you were happy with your previous choices and don't want to get asked again, don't delete this ;)
Yeah /var/db/ports/* for ports options and /var/db/pkg for package related stuff.
I'll update the post.
Best regards.
Greatest tip ever! Now I don't need to reinstall FreeBSD all the time.
Post a Comment