Subject: Re: Removing All Packages
To: None <tech-pkg@netbsd.org, darcy@netbsd.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-pkg
Date: 10/29/2004 19:02:45
On Friday 29 October 2004 18:53, D'Arcy J.M. Cain wrote:
> On Fri, 29 Oct 2004 14:00:49 +0700
>
> Ian Zagorskih <ianzag@megasignal.com> wrote:
> > On Friday 29 October 2004 08:53, Daniel Bolgheroni wrote:
> > > Hi,
> > >
> > > I trying to remove _all_ packages from my system, with the minimal
> > > amount of commands possible.
> > >
> > > What's the easy way to do this?
> > >
> > > Thank you.
> >
> > # pkg_delete -r \*
>
> Make damn sure that you are in the right directory and that you get the
> direction of that slash correct.  Safer is just "rm -rf /usr/pkg
> /var/db/pkg" as someone else suggested.

Just don't forget one thing: packages sometimes keep variable configuration 
files in /usr/pkg/etc. Among them are cups, samba, ldap and other servers, mc 
keeps modifiable files in /usr/pkg/share/mc and so so on.

So when you just remove /usr/pkg you delete all your current system wide 
settings. In some cases like in mine this isn't exactly what you want to 
do :)

// wbr