How to fix error `cached package a-x.y.z: size mismatch, cannot continue` during `pkg upgrade`?

Karl-Philipp Richter richter at richtercloud.de
Wed Feb 25 20:48:18 UTC 2015


Hi,
It seems to have been a server issue. `pkg upgrade` just worked fine
this evening.

Thanks for the input!

Best regards,
Kalle

Am 25.02.2015 um 11:16 schrieb Ben Woods:
> I thought pkg(8) automatically deleted packages if they are the wrong size,
> avoiding the need for a pkg clean?
> 
> Regardless, the following command will delete ALL cached packages (even
> those that are still current). This means if you needed to reinstall the
> packages, they will first need to be re-downloaded from the package
> repository:
> # pkg clean -a
> 
> Note: if the package you are downloading keeps having the wrong file
> size/hash, it is probably the wrong size/hash on the server you are
> downloading it from, meaning this solution will not help. This could be
> because it is corrupt on the server, or simply because the server is half
> way through syncing it's package mirror and the file download is
> incomplete. Perhaps waiting a few hours will help in this case.
> 
> Regards,
> Ben
> 
> 
> On Wednesday, February 25, 2015, Karl-Philipp Richter <
> richter at richtercloud.de> wrote:
> 
>> Hi,
>> According to `man pkg` `pkg clean` should fix the issue, but doesn't. Is
>> that a bug? Experienced with `pkg` 1.4.12 on FreeBSD 10.1.
>>
>> -Kalle
>>
>>
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20150225/fb2e91e0/attachment.sig>


More information about the freebsd-questions mailing list