# pkg: sqlite: database disk image is malformed



## achix (Oct 1, 2013)

Hello FreeBSD gang!

I had this error while trying to do simple pkg commands. I do not know what might have caused this kind of corruption. After playing with `sqlite3 /var/db/pkg/*.sqlite`, where *.sqlite was: local.sqlite, repo-packagesite.sqlite, repo.sqlite and then doing a `PRAGMA integrity_check;` it turned out that my /var/db/pkg/repo-packagesite.sqlite was corrupted. (Thank God it was not my local package database). After renaming this file and doing a `pkg update` the file was re-created (with a different size than the original).

Just wanted to let you know.


----------

