Lost /var/db/pkg

Matthew Seaman matthew at FreeBSD.org
Wed Jun 13 06:27:35 UTC 2012

On 13/06/2012 02:03, William Orr wrote:
> I had a hard disk failure some time ago, and I ended up losing
> /var/db/pkg/ and everything under it (before you say I should've been
> backing it up, I know, I was actually doing an initial full when this
> happened). Is there a way I can restore it, or at least manually add
> entries I know for sure about?

Reinstall all the ports on your system?  Since you've lost /var/db/pkg,
you won't have a handy record of what the necessary packages are.  You
can get a long way by starting with ports you want directly (eg.
firefox) and reinstalling all of their dependencies.

It's unlikely to be completely accurate, and the system will probably
have odd little issues with normal ports maintenance going on.  Perhaps
the most effective procedure would be to wipe out the contents of
/usr/local and /compat/linux and just start again from scratch.



Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120613/cb68ae7e/signature.pgp

More information about the freebsd-questions mailing list