Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2013 01:17:29 -0700
From:      "Ronald F. Guilmette" <>
Subject:   Ah crap!  pkg_version: the package info for package '...' is corrupt
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

Today my system crashed twice while I was doing "portupgrade -a".

I'm not sure but I suspect the new cards I have installed recently may
just be a bit too much for the old power supply I have.  (When the thing
crashed, the machine just simply shut itself off.  This exact same thing
has also happened a couple of other times in the past week.)

I'll deal with the power issue soon, but right now I am more worried about
this new, different, and additional problem I seem to have created for
myself.  When I run pkg_version, I am getting a bunch of messages of
the following general form:

   pkg_version: the package info for package 'PKG' is corrupt

where `PKG' is the name of some package or another that I have installed.

I have at least 6 such messages for different packages I have installed...
and probably more.

I googled around a bit and did not find any good explanation for the
above error or, more importantly, what to do about it.

I gather however that my package data base has become corrupted.

OK, so how does one rebuild that from scratch?

Please don't tell me that I have to reinstall every bleedin' port from


P.S.  Oh!  I just remembered.  I made a full system backup quite recently...
thank god.  Do I just simply need to get the entire contents of /var/db/pkg/
from that and then do "rm -fr /var/db/pkg" and then copy my backup copy
of /var/db/pkg to the real /var/db/pkg ?

Hummm.. that won't reflect the several things that _did_ managed to get
updated, you know, before my system crashed.

Want to link to this message? Use this URL: <>