Subject: Re: pkg_delete ALL how to do this pls?
To: John Klos <>
From: Loren M. Lang <>
List: tech-pkg
Date: 02/25/2005 03:23:51
On Wed, Feb 23, 2005 at 08:39:51PM -0800, John Klos wrote:
> >pkg_info | awk '{ print $1 }' | pkg_delete -f
> pkg_delete -f `pkg_info | awk '{ print $1 }'` would work.
> >>>pkg_delete -f `ls /var/db/pkg`?
> That would work, too.

Both of those examples could potentially create a command line that is
too long.  For situations I like to use find:

find /var/db/pkg -maxdepth 1 ! -path /var/db/pkg -type d -exec pkg_delete -f {} \;

This should work, but I don't feel like testing it at the moment.

> John

I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key:
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C