Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I created a private deb repository to spread a software and it's updates to 600 Ubuntu netbooks. Each time the network is connected, my script try to do a apt-get update.

But sometimes (quite often in fact), I have this :

Failed to fetch https://myserver/ubuntu/dists/maverick/main/binary-i386/voosicomat.deb  **Size mismatch**

The server is an 2.2 Apache, HTTPS only. There is no error on it's logs.

Here is the script :

apt-get update
apt-get dist-upgrade --force-yes --yes

Here is the complete output of apt-get

Ign https://myserver maverick Release.gpg
Ign https://myserver/ubuntu/ maverick/main Translation-en
Ign https://myserver maverick Release
Ign https://myserver maverick/main i386 Packages/DiffIndex
Ign https://myserver maverick/main i386 Packages
Ign https://myserver maverick/main i386 Packages
Hit https://myserver maverick/main i386 Packages
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
  majdb utilitaires voosicomat
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 6207kB/6273kB of archives.
After this operation, 0B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  utilitaires voosicomat majdb
Get:1 https://myserver/ubuntu/ maverick/main voosicomat all 2.0.1 [4755kB]
Get:2 https://myserver/ubuntu/ maverick/main majdb all 1.0.17 [1452kB]
Failed to fetch https://myserver/ubuntu/dists/maverick/main/binary-i386/voosicomat.deb  Size mismatch
Fetched 7091kB in 21s (324kB/s)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
share|improve this question

2 Answers 2

up vote 0 down vote accepted

Your issue is probably a repo bug. If the index isn't updated on the repo, then you'll get the (not very helpful) Size mismatch error.

A possible fix is to update your repo by

  1. Delete trouble packages
  2. Copy the packages back into the repository
  3. Run the repository update script sudo /usr/local/deb/update

You might also edit your apt sources.list to remove all repos except your local one.

share|improve this answer
You mean it's a difference between the information in Packages.gz file and the .deb files? Very weird, update of Packages.gz is part of the release process, before to upload file to APT server. And the update process is update first, upgrade after. –  Cédric Girard Jun 22 '11 at 10:48

I'm running Ubuntu 11 and deleted all *.deb under /var/cache/apt/archives/

Then ran: apt-get --fix-install install

Seemed to work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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