View Single Post
  #3   (View Single Post)  
Old 4th March 2015
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

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
Code:
cabextract
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

Last edited by shep; 4th March 2015 at 04:23 PM.
Reply With Quote