Date: Wed, 3 May 2006 11:56:14 -0400 From: Robert Huff <roberthuff@rcn.com> To: freebsd-questions@freebsd.org Subject: Re: how get "/var/db/pkg"? Message-ID: <17496.53918.497622.395498@jerusalem.litteratus.org> In-Reply-To: <4458C2B7.40605@voidmain.net> References: <ecbcb8050605022205t306f7b8bi4470dac95edbf488@mail.gmail.com> <17496.48046.574945.900645@jerusalem.litteratus.org> <4458C2B7.40605@voidmain.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Tom Grove writes:
> If you haven't run locate since you delete /var/db/pkg you could run:
>
> locate "/var/db/pkg"
>
> This will at least give you a partial (maybe a full) listing of
> everything you have installed. From there you could do a script that
> does something like:
>
> for $program in <fileofpackagenames>
> pkg_delete $program
> pkg_add $program
>
> Just a thought....
Try:
locate "/var/db/pkg" | awk '{FS = "\/\\+.*$"} {print $1}' | \
awk '{FS = "/$"} {print $1}' | sort -u
This will reduce the output to one line per package.
Robert Huff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17496.53918.497622.395498>
