Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 May 2006 10:48:23 -0400
From:      Tom Grove <freebsd@voidmain.net>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: how get "/var/db/pkg"?
Message-ID:  <4458C2B7.40605@voidmain.net>
In-Reply-To: <17496.48046.574945.900645@jerusalem.litteratus.org>
References:  <ecbcb8050605022205t306f7b8bi4470dac95edbf488@mail.gmail.com> <17496.48046.574945.900645@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Huff wrote:

>xiang writes:
>
>  
>
>> Today,i run "pkgdb -F",but get a error message:"you do not own
>> /var/db/pkg",becouse i had delete /var/db/pkg by oversight just
>> the other day.
>>
>> how can i do now?
>>    
>>
>
>	If you have deleted all contents of /var/db/pkg, and you don't
>have a backup, you're screwed.  You'll have to reinstall every to
>rebuild the db.
>	If, however, you just deleted pkgdb.db then "pkgdb -U" will
>repopulate it.
>
>
>				Robert Huff
>
>_______________________________________________
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>
>
>  
>
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....

-Tom Grove



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4458C2B7.40605>