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.

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.
–
user25656May 12 '12 at 7: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.
–
dumb906May 13 '12 at 8:01

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 GruberAug 7 '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.
–
AlvarDec 4 '13 at 15:55

5 Answers
5

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.

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_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.

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

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.

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.
–
AvioMay 17 '12 at 8: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 SuhMay 17 '12 at 9: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 ShahMay 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 CastroMay 18 '12 at 14:02

7

I went ahead and report the bug: bugs.launchpad.net/launchpad/+bug/1001780
–
chilicuilMay 19 '12 at 21:43

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.

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/un‌​iverse/binary-i386/Packages.bz2 Since it isn't being updated regularly there's nothing new to download from it.
–
John S GruberMay 18 '12 at 14:58

When did you first notice this problem?
–
John S GruberMay 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 SuhMay 18 '12 at 21:21

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 SuhMay 21 '12 at 21:38

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).