1

As you know, every time you update your repositories in Ubuntu 12.04, the universe repository downloads all of it's contents in your computer, whether they have been changed from the last time you update them or not. And in a country like mine where Internet connection is too slow, it will cause some problems.

Is there a way to restrict downloading of the contents to the times when they really changed like the other repositories?
I don't want to disable the universe repository, I just want it to treat like other repos and don't get download every time I "apt-get update"

2 Answers 2

3

This is a common bug on ubuntu 12.04.

Workaround:

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.

Even after the problem is fixed, it may make sense to consider how to 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.


Another workaround is 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.


Another Option is to switch to a mirror instead of using us.archive.ubuntu.com

There are many mirrors which doesn't update the index regularly( probable once in a week).I solved the problem by switching to that particular mirror.

you can locate a mirror near you and see if that helps.

Hope this will help.


Source: Here

1

Disable source code from software sources as here .

Disabling source code reduces the Updated Sources sizes.

enter image description here

It will considerably reduce Update size as can be seen in this question here.

the size of apt-get update lists is too big

2
  • I don't want to disable the universe repo at all. I just want it to treat like other repos and don't get download every time I "apt-get update" Aug 3, 2012 at 12:01
  • Then Just disable the source code to reduce the updating size. Please include that info in question.
    – atenz
    Aug 3, 2012 at 12:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .