On 13/10/2013 20:24, Anton Shterenlikht wrote: > My box crashed during "pkg upgrade". > On reboot I get: > > # pkg update > Updating repository catalogue > pkg: sqlite: database disk image is malformed (pkgdb.c:1274) > # > > What's broken? > And how can I recover?
Not sure exactly what's broken, but you can usually recover by: rm /var/db/pkg/repo-*.sqlite and then use pkg as normal. It's safe to delete the repo sqlite files as all the information in them comes from the repository catalogues and can be regenerated from source as desired. Failing that, there should be a nightly backup in /var/backups/pkgdb.bak.tbz but that can be up to a day old, so be prepared to redo any package updates from the day in order to resynch it with what's on the filesystem. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey
signature.asc
Description: OpenPGP digital signature