I had trouble on a test system going from OpenBSD 5.2 to 5.3.
Several of the packages would not upgrade as my /var/pkg/db was damaged.
So I decided to just delete all packages and the database and start over.
Here are the steps I took.
1) Try to delete all packages:
#pkg_delete /var/db/pkg/*
2) For those packages that will not uninstall (damaged), download the package tar files from an OpenBSD ftp site and try re-installing them:
$ftp ftp.openbsd.org
get badpackage1.tgz
get badpackage2.tgz
....
#pkg_add -r -D badpackage1.tgz
#pkg_add -r -D badpackage2.tgz
...
3) After the "bad" packages are reinstalled, delete all packages again:
#pkg_delete /var/db/pkg/*
4) Now the database should be empty (undamaged) and you can reinstall all packages.
|