29

This question contains circumventions for an bug in Ubuntu:

as well as some general advice on saving bandwidth when doing apt-get update.

That bug was closed on 8 Aug 2012, so you may only need the information related to this question should the bug reappear. If that happens please file another bug report on Launchpad.


I ran a clean install to Ubuntu 12.04 and so far everything has been working well. I especially commend the Ubuntu team for this release.

I only noticed that the size of repository update is now about ~13MB. Normally, it is about this size for the first time you run apt-get update after a clean install and then ~ 23kb - 1300kb for subsequent updates.

The output from apt-get update is the same I get for previous versions of Ubuntu (its pretty normal). Its a bit too long but look at an example output I got from running apt-get update.

Ign http://archive.canonical.com precise InRelease
Ign http://dl.google.com stable InRelease
Ign http://dl.google.com stable InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Hit http://download.virtualbox.org precise InRelease
Ign http://security.ubuntu.com precise-security InRelease
Ign http://linux.dropbox.com precise InRelease
Ign http://extras.ubuntu.com precise InRelease
Ign http://download.skype.com stable InRelease
Hit http://archive.canonical.com precise Release.gpg
Get:1 http://dl.google.com stable Release.gpg [198 B]
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net oneiric InRelease
Ign http://ppa.launchpad.net precise InRelease
Get:2 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:3 http://extras.ubuntu.com precise Release.gpg [72 B]
Hit http://download.virtualbox.org precise/contrib i386 Packages
Ign http://download.skype.com stable Release.gpg
Hit http://linux.dropbox.com precise Release.gpg
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Hit http://archive.canonical.com precise Release
Get:4 http://dl.google.com stable Release.gpg [198 B]
Ign http://ppa.launchpad.net oneiric InRelease
Ign http://ppa.launchpad.net oneiric InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Get:5 http://security.ubuntu.com precise-security Release [49.6 kB]
Hit http://extras.ubuntu.com precise Release
Ign http://download.skype.com stable Release
Ign http://download.virtualbox.org precise/contrib TranslationIndex
Get:6 http://us.archive.ubuntu.com precise Release.gpg [198 B]
Hit http://archive.canonical.com precise/partner i386 Packages
Hit http://linux.dropbox.com precise Release
Get:7 http://ppa.launchpad.net precise Release.gpg [316 B]
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://extras.ubuntu.com precise/main Sources
Get:8 http://ppa.launchpad.net precise Release.gpg [316 B]
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Get:9 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
Ign http://archive.canonical.com precise/partner TranslationIndex
Ign http://download.skype.com stable/non-free i386 Packages/DiffIndex
Get:10 http://dl.google.com stable Release [1,347 B]
Hit http://linux.dropbox.com precise/main i386 Packages
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net oneiric Release.gpg
Hit http://extras.ubuntu.com precise/main i386 Packages
Ign http://extras.ubuntu.com precise/main TranslationIndex
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net oneiric Release.gpg
Hit http://ppa.launchpad.net oneiric Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Get:11 http://us.archive.ubuntu.com precise-backports Release.gpg [198 B]
Ign http://download.skype.com stable/non-free TranslationIndex
Get:12 http://dl.google.com stable Release [1,347 B]
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Ign http://linux.dropbox.com precise/main TranslationIndex
Hit http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Get:13 http://ppa.launchpad.net precise Release [11.9 kB]
Get:14 http://us.archive.ubuntu.com precise Release [49.6 kB]
Hit http://download.skype.com stable/non-free i386 Packages
Get:15 http://dl.google.com stable/main i386 Packages [1,268 B]
Ign http://dl.google.com stable/main TranslationIndex
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net oneiric Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net oneiric Release
Get:16 http://security.ubuntu.com precise-security/main Sources [7,089 B]
Hit http://ppa.launchpad.net oneiric Release
Get:17 http://dl.google.com stable/main i386 Packages [769 B]
Ign http://dl.google.com stable/main TranslationIndex
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Get:18 http://security.ubuntu.com precise-security/restricted Sources [14 B]
Get:19 http://security.ubuntu.com precise-security/universe Sources [3,653 B]
Get:20 http://security.ubuntu.com precise-security/multiverse Sources [696 B]
Get:21 http://security.ubuntu.com precise-security/main i386 Packages [32.9 kB]
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:22 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]
Ign http://ppa.launchpad.net precise/main Sources/DiffIndex
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Get:23 http://security.ubuntu.com precise-security/restricted i386 Packages [14 B]
Get:24 http://security.ubuntu.com precise-security/universe i386 Packages [8,594 B]
Get:25 http://security.ubuntu.com precise-security/multiverse i386 Packages [1,393 B]
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:26 http://us.archive.ubuntu.com precise-backports Release [49.6 kB]
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:27 http://ppa.launchpad.net precise/main i386 Packages [1,276 B]
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Get:28 http://us.archive.ubuntu.com precise/main Sources [934 kB]
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net oneiric/main Sources
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net oneiric/main Sources
Hit http://security.ubuntu.com precise-security/universe Translation-en
Ign http://archive.canonical.com precise/partner Translation-en_US
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://ppa.launchpad.net oneiric/main Sources
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Ign http://extras.ubuntu.com precise/main Translation-en_US
Ign http://download.virtualbox.org precise/contrib Translation-en_US
Ign http://archive.canonical.com precise/partner Translation-en
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Ign http://extras.ubuntu.com precise/main Translation-en
Ign http://download.virtualbox.org precise/contrib Translation-en
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Ign http://linux.dropbox.com precise/main Translation-en_US
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://download.skype.com stable/non-free Translation-en_US
Ign http://linux.dropbox.com precise/main Translation-en
Ign http://download.skype.com stable/non-free Translation-en
Ign http://dl.google.com stable/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Ign http://dl.google.com stable/main Translation-en_US
Get:29 http://us.archive.ubuntu.com precise/restricted Sources [5,470 B]
Get:30 http://us.archive.ubuntu.com precise/universe Sources [5,019 kB]
Ign http://dl.google.com stable/main Translation-en
Get:31 http://us.archive.ubuntu.com precise/multiverse Sources [155 kB]
Get:32 http://us.archive.ubuntu.com precise/main i386 Packages [1,274 kB]
Get:33 http://us.archive.ubuntu.com precise/restricted i386 Packages [8,431 B]
Get:34 http://us.archive.ubuntu.com precise/universe i386 Packages [4,796 kB]
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Get:35 http://us.archive.ubuntu.com precise/multiverse i386 Packages [121 kB]
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Get:36 http://us.archive.ubuntu.com precise-updates/main Sources [31.2 kB]
Get:37 http://us.archive.ubuntu.com precise-updates/restricted Sources [765 B]
Get:38 http://us.archive.ubuntu.com precise-updates/universe Sources [10.1 kB]
Get:39 http://us.archive.ubuntu.com precise-updates/multiverse Sources [696 B]
Get:40 http://us.archive.ubuntu.com precise-updates/main i386 Packages [96.5 kB]
Get:41 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [770 B]
Get:42 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [27.7 kB]
Get:43 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [1,393 B]
Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Get:44 http://us.archive.ubuntu.com precise-backports/main Sources [700 B]
Get:45 http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B]
Get:46 http://us.archive.ubuntu.com precise-backports/universe Sources [1,680 B]
Get:47 http://us.archive.ubuntu.com precise-backports/multiverse Sources [14 B]
Get:48 http://us.archive.ubuntu.com precise-backports/main i386 Packages [559 B]
Get:49 http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B]
Get:50 http://us.archive.ubuntu.com precise-backports/universe i386 Packages [1,391 B]
Get:51 http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [14 B]
Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Hit http://us.archive.ubuntu.com precise-updates/main Translation-en
Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://us.archive.ubuntu.com precise-backports/main Translation-en
Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Fetched 12.8 MB in 1min 33s (137 kB/s)

Is this a new feature in 12.04? Or, if it is unintended, is there a way I can fix this? Thanks.

blade19899
  • 26,704
dumb906
  • 625
  • 2
    Could you please edit your question to provide what you see when you run apt-get update? By the way, if you have source code ticked in the update manager, unticking it will help. In my case, it brought down the size from ~13 to ~6 MB. –  May 12 '12 at 07:35
  • 4
    that doesn't fix it. the problem seems to be that apt-get update reloads the cache for every repository instead of incremental updates as @izx stated below. – dumb906 May 13 '12 at 08:01
  • @dumb906, you might see my answer to a similar question here. – zpletan May 14 '12 at 12:50
  • thanks @zpletan but that's not a general solution. – dumb906 May 15 '12 at 11:10
  • Can you post here, what is your output after running this apt-config dump | grep 'APT::Periodic::Update-Package-Lists'. May be answer lies in it. – Anwar May 15 '12 at 17:47
  • APT::Periodic::Update-Package-Lists "0";. It changes with the option Automatically check for update in Software sources under Updates – dumb906 May 15 '12 at 18:37
  • @dumb906, Would you remind removing the word "cache" from the title? The cache is disk storage on your cmputer. The updates are redundant and waste bandwidth, but they just replace files in the cache with identical ones. New releases of packages do grow the cache, on the other hand. I think this word may have confused rm-vanda leading to his answer. – John S Gruber May 20 '12 at 01:24
  • done that @JohnSGruber. I used the word lists to denote packages which I think is acceptable. – dumb906 May 21 '12 at 21:50
  • 2
    Fixed. See the bug –  Aug 07 '12 at 14:43
  • 2
    I verified the fix by trying apt-get again, and examined many of the archive.ubuntu.com repository dates--they are back to normal. – John S Gruber Aug 07 '12 at 15:39
  • 1
    This question appears to be off-topic because it is about bug that is now solved. The answer shouldn't be followed since the use case doesn't exist anymore. It's only here as historical value, and should be viewed as such. It might be useful as experience for the same problem in the future, but the answer may not be accurate. – Alvar Dec 04 '13 at 15:55

5 Answers5

29

I think there are a couple of things worth noting here.

Looking at the same us.archive.ubuntu.com or archive.ubuntu.com archives, You can see that the Main and Universe distribution Package.bz2 files are being marked as modified twice an hour, even though they contain the same content. These repositories are actually frozen. As they hold entries for each package in main and universe this is causing the average download to be very large. This causes the server to send apt-get update huge package file again even though nothing has actually changed. The package file contains the version number and description of the most current version of each package in the repository. The actual release files contain the date and time of the last real change.

chilicuil has kindly filed a bug report for this and at this writing this is thought to be a problem with Ubuntu archive mirroring mechanisms. Thank you, chilicuil. The bug is at http://bugs.launchpad.net/launchpad/+bug/1001780

Note that this bug has been closed, so the following circumvention should no longer be needed or used:

Since the affected repositories are the unchanging distribution repositories, one approach to circumventing this problem is to run the following commands immediately before running sudo apt-get update. Be sure to adjust them for the name of the archive site you use as well as the name of the release you are using. Not everyone will need all four commands--see the comments at the end of the commands. Don't use them for the development release.

  • sudo touch /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
  • sudo touch /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages # If you have enabled Ubuntu Universe
  • sudo touch /var/lib/apt/list/us.archive.ubuntu.com_ubuntu_dists_precise_main_source_Sources # If you have enabled sources
  • sudo touch /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources # If you have enabled both Universe and sources

These commands tell the system that these files are up-to-date by updating the time on the archive files. Don't run these commands on other repositories, or after the bug is fixed.

Now that the problem has been fixed, it may make sense to consider how to further reduce bandwidth when running apt-get if you run it regularly and have either a slow or an expensive Internet connection.

  1. It may make sense to run the update less often or, equivalently, choose a repository that is updated less often the main ones.

  2. Many include the "source" repositories in their list of software sources. This is useful for doing apt-get source packagename, but that may be sort of old-fashioned.

    Unless you get source every day, you might consider removing the source setting, and enable it again and do an update only when you want to download some source. The source of various packages is always changing so the index to be downloaded is always changing, too.

    You can also consider using Ubuntu Distributed Development for smaller packages, using bazaar. In other words:

    bzr branch lp:ubuntu/sourcename

    This downloads both the package source and its history, in compressed form. This history for bigger packages may have many megabytes, so you may want to restrict this strategy to small packages. If you can use this instead of "apt-get source packagename" you can keep the source repositories out of you repo list altogether.

John S Gruber
  • 13,336
  • I agree with this answer. Ubuntu 12.04 has just been released and thus there is a sustained activity in releasing improvements and bug fixes. Hence the abnormal bandwidth consumption. My advice is to pay the price and update normally. – Avio May 17 '12 at 08:07
  • 2
    This seems to be the common refrain, but "sustained activity" can't explain why people have been experiencing this issue on Mint 11 and 12, 11.10 in addition to 12.04 (Note I've always had these large fetches since early alpha of 12.04). Please take a look at the links given in comments elsewhere on this question.

    Basically, the issue is this: people using apt-get update several times a day find large 10-20MB fetches. There is obviously not THAT much activity. I'm beginning to think a bug report is the correct response here.

    – Chan-Ho Suh May 17 '12 at 09:29
  • 1
    I completely agree with Chan-HoSuh, This can only be explained by a bug. (I am going mad with this kind of .... in an LTS release). This is not an answer. I ran the command sudo apt-get update with 1 hr interval, and it again downloads every index files. – Anwar May 17 '12 at 17:11
  • 2
    @Chan-HoSuh It happens a bunch during the alpha/beta because the archive is always changing so that's expected before release. – Jorge Castro May 18 '12 at 14:02
  • Yes, but I've always noticed this: ~13 MB fetches even when done in 30 minute intervals. This is normal, you say? – Chan-Ho Suh May 18 '12 at 18:03
  • 7
    I went ahead and report the bug: bugs.launchpad.net/launchpad/+bug/1001780 – Javier López May 19 '12 at 21:43
  • @chilicuil, thanks. I've added some info I've discovered. – John S Gruber May 21 '12 at 02:08
8

I tried switching to a mirror instead of using us.archive.ubuntu.com and it has fixed the problem! With the usual Ubuntu server, I found that just checking a mere half hour later I would get another ~13MB fetch from apt-get update; however, with the mirror, it's gone down to < 1MB.

Basically what I did was open up /etc/apt/sources.list and replace:

deb http://us.archive.ubuntu.com/ubuntu precise main restricted universe multiverse

with

deb http://us-west-1.ec2.archive.ubuntu.com.s3.amazonaws.com/ubuntu precise main restricted universe multiverse

I don't know if there's something special about the Amazon S3 mirrors but you can locate a mirror near you and see if that helps. The first fetch was large (~16MB) but subsequent ones were < 1MB.

Chan-Ho Suh
  • 7,562
  • I fetched the Packages.bz2 file from that repository and it hasn't been updated for a while. Last-Modified: Tue, 24 Apr 2012 17:03:15 GMT is the header returned from wget -v -S http://us-west-1.ec2.archive.ubuntu.com.s3.amazonaws.com/ubuntu/dists/precise/universe/binary-i386/Packages.bz2 Since it isn't being updated regularly there's nothing new to download from it. – John S Gruber May 18 '12 at 14:58
  • When did you first notice this problem? – John S Gruber May 18 '12 at 15:03
  • I've been informed the S3-backed servers are having issues right now. I've noticed these large fetches ever since early 12.04 alpha (I wasn't on Oneiric long enough to notice there). – Chan-Ho Suh May 18 '12 at 21:21
  • I switch mine from the standard to one in netherlands. after the first big update the next update was now small as it should be. it was actually 5,375B. thanks @Chan-HoSuh – dumb906 May 19 '12 at 07:28
  • Well, let's not jump the gun here! Did you check the last-modified date using John's suggestion? I've now tried another mirror and checked the last-modified date. The new mirror apparently takes a day or so to update, so I'll update my response with the result. I have a good feeling about it, since the first apt-get update from the mirror was not large like with the outdated mirrors. – Chan-Ho Suh May 19 '12 at 11:29
  • Just noticed the mirror has updated, so I tried sudo apt-get update and found... ~13MB again. @dumb906, unless it really worked for you, please unaccept my answer. This issue is still unresolved. – Chan-Ho Suh May 19 '12 at 11:37
  • Ok. I tried updating just now and found it to be ~13MB, then another and it was <1MB. it seems this update mirror doesn't update as frequently as the default mirror. So as @Chan-HoSuh suggested I've unaccepted his answer. thanks for the try. – dumb906 May 19 '12 at 16:55
  • 9
    I went ahead and report the bug: https://bugs.launchpad.net/launchpad/+bug/1001780 – Javier López May 19 '12 at 21:38
  • The check I listed in the top comment on this answer is not good. Better to check with wget -v -S http://us-west-1.ec2.archive.ubuntu.com.s3.amazonaws.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages.bz2. This archive is still out of date, however. Checking https://launchpad.net/ubuntu/+archivemirrors is probably best, however. – John S Gruber May 21 '12 at 19:29
  • 3
    Hi John. Thanks for all your work. With regard to what is perhaps a triviality, I'd like to reward @chilicuil somehow, but as he has not posted an answer and yours is the most informative answer, I think I'll reward you the bounty. – Chan-Ho Suh May 21 '12 at 21:38
  • @JohnSGruber They seem to be up-to-date now. – jrg May 24 '12 at 01:43
  • @jrg I can confirm that, but now it has the same problem the main and us archives have so we can't use it to completely circumvent the problem. It's a shame, that would be easier for people to use. For universe i386 packages: Last-Modified: Wed, 23 May 2012 20:56:33 GMT. It does seem to be modified less often than every 30 minutes, however. – John S Gruber May 24 '12 at 03:00
5

A workaround to update only the interested Index file:

Most of the time, we update package list to add a PPA. so this is a workaround for that

  1. Create a file as /etc/apt/apt.conf.d/99mysettings and
    put this line in the file. Apt::Get::List-Cleanup 'false';.

    How ? : Type these in a terminal sudo gedit /etc/apt/apt.conf.d/99mysettings.

    Explanation: It causes apt-get not to delete the index files which are already downloaded.

  2. Disable the repositories which you do not like to update now. You can go here to see how you can disable repositories .

  3. Then run apt-get update command in a terminal. wait till it ends.

  4. Finally again enable all repositories which you have disabled a few minutes ago. You have now updated PPA index with all previous indexes

Hope this will help.

Anwar
  • 76,649
  • I have added this to another question. But i thought It can help in this situation also. I am using this and added many PPAs without downloading that huge stuff – Anwar Jun 17 '12 at 06:42
0

Good news!!

This bug is fixed now. See this launchpad link.

All you need is to upgrade:

Opening a terminal and executing

sudo apt-get update
sudo apt-get upgrade

will do the job.

Anwar
  • 76,649
-5

Try go to your Update manager and remove some ppa's. Some ppa's like spotify aren't really important because it works as it should and it's already installed on my laptop so I don't need that ppa(just an example).

PPA's

Just try to remove some PPAs.

belacqua
  • 23,120
Jeggy
  • 3,062
  • 4
    yes like removing the disabling sources repository. but the major culprits seems to be official ubuntu repositories. thanks but doesn't solve it. – dumb906 May 15 '12 at 18:37