From owner-freebsd-questions@FreeBSD.ORG Wed Feb 25 10:16:40 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07DA15C5 for ; Wed, 25 Feb 2015 10:16:40 +0000 (UTC) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89744D6D for ; Wed, 25 Feb 2015 10:16:39 +0000 (UTC) Received: by wghl2 with SMTP id l2so2594048wgh.9 for ; Wed, 25 Feb 2015 02:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sETs9oLl7KkdIjQL2ZNKAWQaejS6pekrX6OUvlcxAPQ=; b=KFiRsnhTVXTgjkK0uvc4UC9maasAuTN8C7Tg8vRTfLj+spaEqQS+DDwwvtiUqxtj9+ LuhIuFCce/n2joFxLX3MHeXr+8Ytxbfiv0PDmk0BbT/CLfLjXpQih16DJk97xyT0kMGd homByulIJKO0TwRT74Jhw2QMlHiED4MCLBC2EatW509pWEGWR4L+9+u5y75tWAUd0d/C cYy48P6YiQMbVK+amzZHRnRL56KYbK4KKBkC3NVkHa5tRR5GqNc2Fyu87SzO920MCoDW +ydU0R/QdOl7+BSSWNIkGkwEUqFO57QhTeMk00WmQIMVihwh6eQizEKlcf50amWncaYW R9KQ== MIME-Version: 1.0 X-Received: by 10.180.108.13 with SMTP id hg13mr5014285wib.7.1424859397652; Wed, 25 Feb 2015 02:16:37 -0800 (PST) Received: by 10.194.241.132 with HTTP; Wed, 25 Feb 2015 02:16:37 -0800 (PST) In-Reply-To: <4tuey3akkcb4.ma9n39-4c0vk8az116k5a@api.elasticemail.com> References: <4tuey3akkcb4.ma9n39-4c0vk8az116k5a@api.elasticemail.com> Date: Wed, 25 Feb 2015 18:16:37 +0800 Message-ID: Subject: Re: How to fix error `cached package a-x.y.z: size mismatch, cannot continue` during `pkg upgrade`? From: Ben Woods To: Karl-Philipp Richter Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2015 10:16:40 -0000 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@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 > > -- -- From: Benjamin Woods woodsb02@gmail.com