While upgrading, I tried to add a package that was already there and due to some error, a partial package got created - partial-gnutls.

When I try to delete this partial package, I get these errors:

File /usr/local/share/locale/cs/LC_MESSAGES/pkg.qX9SMkCPZb does not exist                                                            
File /usr/local/share/locale/de/LC_MESSAGES/pkg.Dfpr8PbT3X does not exist                                                            
File /usr/local/share/locale/en@boldquot/LC_MESSAGES/pkg.wIH7fQJbhK does not exist                                                   
File /usr/local/share/locale/en@quot/LC_MESSAGES/pkg.c8llMmPSGl does not exist                                                       
Read failed: Input/output error at /usr/libdata/perl5/OpenBSD/md5.pm line 59          

I checked the source code. It is some coe that adds a file into some data structure (most probably, it is finding out which files to delete) and it fails to do so because the file is no longer there.

How do I get rid of this partial package?


You could try creating an empty file for each of the files listed, e.g.:

touch /usr/local/share/locale/cs/LC_MESSAGES/pkg.qX9SMkCPZb

and so on. Once the files are there use pkg_delete -qq to delete without comparing recorded checksums.

If that doesn't work, /var/db/pkg/<pkg-name>/+CONTENTS lists the package's contents and locations where files have been installed, so could could also use that information to delete the files manually and then remove the offending /var/db/pkg/<pkg-name> directory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.