Subject: Re: pkg_delete ALL how to do this pls?
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 02/25/2005 09:59:07
On Thu, 24 Feb 2005, Julio M. Merino Vidal wrote:
> pkg_delete -f '*'
>
> or brute force:
>
> rm -rf /usr/pkg /var/db/pkg*

These are sledgehammer methods that ask for more trouble than they are 
worth. As has already been suggested, the (probably only) good way is

 	pkg_delete -r -R \*

From each pkg delete it including the pkgs that need it (-r), e.g. when 
jpeg is first in the list, it will nuke a lot. The -R is to nuke as much 
as possible from "high" above, e.g. for "kde", it will also delete all the 
pkgs that kde pulled in. "\*" obviously means all pkgs, escaped from the 
shell. The previous options are needed as the pkg wildcard will not sort 
pkgs, in contrast to what the shell wildcards do. Plus alphabetic sorting 
wouldn't buy anything anyways.


  - Hubert

-- 
NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)