Sponsored Links

QuickTips : Stop apt downloading Translations Indexes

I’ve noticed that recently, Debian-based distributions seem to be attempting to download a bazillion Translations Indexes from their repositories. Most of the these attempts seem to be either ignored, or fail, and sometimes it even seems to slow down the update download itself, presumably because it takes time for the repository server to time out the request.

Update : 2012-04-12 : This works fine in Debian Wheezy and Ubuntu Precise (12.04), but does not work in Ubuntu 11.10 – in fact it seems 11.10 ignores all variants of this directive. Thanks to ssta for the heads-up.

 

Possibly a waste of time for most users…

 

 

You can see this whilst updating the package repositories using apt-get update, update in aptitude, or updating the package list in Synaptic.

Personally, I find this behavior a bit annoying and wanted it to go away.

 

 

 

After a bit of research, I found out how to configure apt to stop looking for these, so here’s how…

 

1) Edit (or create) a file called /etc/apt/apt.conf

sudo vi /etc/apt/apt.conf

Then add the following directive;

Acquire {
           Languages "none";
};

2) Remove any existing “*i18n*” files from /var/lib/apt/lists/

cd /var/lib/apt/lists

Now, you have a choice; one or the other of the following;

A) The safer method;

sudo rm -i *i18n*

The system will ask for confirmation for each file you wish to delete – there may be quite a lot of these :)

B) The time-saving but be careful how you type this one method;

sudo rm *i18n*

Now if you perform an apt-get update, or update via aptitude or synaptic, your system should no longer try do download the Translation Indexes.

This works for me on Debian and Ubuntu.

 

VN:F [1.9.22_1171]
Rate This Article
Rating: 9.8/10 (20 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
QuickTips : Stop apt downloading Translations Indexes, 9.8 out of 10 based on 20 ratings
Share the knowledge :
Facebook Twitter Pinterest Linkedin Digg Delicious Reddit Stumbleupon Posterous Email Snailmail

10 comments to QuickTips : Stop apt downloading Translations Indexes

  • ssta

    Interestingly does not work for me in Ubuntu…
    What apt version are you on?
    11.10 (apt 0.8.16~exp5ubuntu13.2) here.
    Have tried both the stanza you suggest and the more old-fashioned syntax: Acquire::Languages "none";
    Looks like Debian fixed it twice (presumably the first fix wasn't complete): in apt/0.8.15.9 and apt/0.8.16~exp7.
    Irritating, because this would have been a nice feature.
    As ever, good writeup.  You going to be in nodnoL anytime in the next year or two?
     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • This works in Debian Wheezy, with "apt 0.8.15.10 for amd64 compiled on Mar  6 2012 14:33:57".

      I'll check ubuntu 11.10 and update the article if I find a fix for it – thanks for the heads-up :)

      As far as nodnoL is concerned, I'll update you about that on IRC if I see you.

      Regards

      Kev.

      Edit : Also works in Ubuntu 12.04 Precise, so, looks like a quirk particular to Ubuntu 11.10. I update the article to reflect this.

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Nick

    Thanks so much for this! I was looking all over the web to get a way to do this.
    Cheers!

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • It is a bad idea to disable all Translation-files with "none" as this effectively means that you don't get the english long description for packages anymore, so at least instruct APT to download "en" or commands like 'apt-cache show' and 'apt-cache search' (as well as every higher-level frontend providing the same data) will be crippled.
    Step 2 might be a good idea though, depending on what you have accumulated. APT supports a multitude of different setups here, so getting it right was kinda hard (useless fact: The code for interpreting this configuration option is alone longer than 200 lines) – especially as the repository underneath is in flux. Debian for example doesn't even have a "TranslationIndex" anymore as the information was merged into the Release file. Ubuntu has the old style and then APT still has to support very-old style without any indexes whatsoever. Supporting three partly conflicting styles can be kinda hard, too …
    A verbose description of this option can be found in 'man apt.conf' (which – beware of the irony – is available in different translations if you haven't removed them with stuff like localepurge …). The text differs a bit between versions (mostly additions though), but the idea remains the same. And aparte from the fact that some people don't like it, the default is trying to do the right thing by default and usally does it.
    If you think the translated descriptions aren't useful you might have found an area in which you can help improving the world. It is nice that you can install thousands of packages from your distribution, but this is worthless if a user needs to speak english to understand what a program does as many possible users simple can't read/write (enough) english.
    @ssta: This isn't old-fashioned syntax. You can use both to express the same – for a single option yours is shorter of course, but if you set multiple settings in the same scope it is easier the other way. Again, manpage has all the details in case someone is interested.
    (Disclaimer: If you haven't got it by now, I am an APT Team member and this perticular features was implemented by me, so I might be kind of biased.)

    VA:F [1.9.22_1171]
    Rating: +2 (from 2 votes)
  • Chris

    Im okay with the world defaulting to English. Piss on the indexes and translations.

    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  • Chris

    Furthermore, I'm perfectly happy with everyone in my company being required to know english, which is the environment I support servers in. Again, having Russian package translations available is useless in that environ, but not having every box take an extra minute to update is useful.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • HI there

    It is a bad idea to disable all Translation-files with "none" as this effectively means that you don't get the english long description for packages anymore, so at least instruct APT to download "en" or commands like 'apt-cache show' and 'apt-cache search' (as well as every higher-level frontend providing the same data) will be crippled.

    You know what? I WANT it to be crippled. Why? Because;

    1) I'm an experienced linux admin and user, who's been implementing servers for decades. I don't really NEED full descriptions of packages – I know what the ones I actually want and use, do.

    2) If I don't know what a package does, or I'm looking to see if a package exists for something I want to do, I'll look this stuff up on the web, then see if the software exists as a package in the distro's repository.

    3) Production servers : they usually have been configured and tuned to do the specific task or tasks assigned to them. I only want to know if there exists a package upgrade/bug-fix. I do not want to be hanging around waiting for a bazillion Translations indexes – or even an english translation index or whatever a particular distro is using for those. I want a) the package database updated, and b) the relevent updates downloaded and installed. I'm not going to hang around waiting for a package repository server to time out after not finding a particular translation which I don't want or need. :)

    Step 2 might be a good idea though, depending on what you have accumulated. APT supports a multitude of different setups here, so getting it right was kinda hard (useless fact: The code for interpreting this configuration option is alone longer than 200 lines) – especially as the repository underneath is in flux. Debian for example doesn't even have a "TranslationIndex" anymore as the information was merged into the Release file. Ubuntu has the old style and then APT still has to support very-old style without any indexes whatsoever. Supporting three partly conflicting styles can be kinda hard, too …

    I completely sympathise with you – supporting multiple distros is a nightmare, as I discovered from writing my RDP utilities…

    And aparte from the fact that some people don't like it, the default is trying to do the right thing by default and usally does it.

    Perhaps I'm wrong about this, but it appears to me that the default – which looks to me like "download every Translation available" (especially on Ubuntu) – is poorly implemented. What do I mean by that? I mean that when installing a distribution, there should be an install time option which asks the admin installing the system, the specific translation or translations they wish the system to grab from the repository during a package database refresh. Surely, the default behaviour should be "only install the relevent translation based on the language selected at the distribution's initial installation", and then even offer additional translations at that time. Surely that's a simple thing to implement?

    If you think the translated descriptions aren't useful you might have found an area in which you can help improving the world.

    No no, the translated descriptions are IRRELEVENT to ME – I don't NEED them, I don't WANT them, and they increase the packages database update time to such an extent that I had to find a way to STOP apt from downloading them! 

    It is nice that you can install thousands of packages from your distribution, but this is worthless if a user needs to speak english to understand what a program does as many possible users simple can't read/write (enough) english.

    So why punish the English-speaking users by having them download a bazillion irrelevent (to them)  translations and have them WAIT for the privelege? Actually on that subject, why DOES it seem like apt is waiting for a Translation index which then times out after an irritating amount of time?

    Why can't Chinese users just say "I want to download only Chinese translations, or English and Chinese"?

    Why can't French users just select the French translations at distro install time and have only those be downloaded?

    And so on and so forth.

    So, yes, you have some good points – I happen to think my counterpoints are better. I'm seriously NOT trying to piss you off, but, merely point out what I think is being done wrong. Please, if you disagree with me I'm very willing to consider any further points you make :)

    Best regards!

    VN:F [1.9.22_1171]
    Rating: +2 (from 2 votes)
  • Chris

    I'd agree with that, Kevin. split off the translation indexes into their own packages, installed by default when you select a given language.
     
    Dont stuff up the rest of the distro for everyone else.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Adding the following line

    Acquire::Languages “none”;
    to
    /etc/apt/apt.conf.d/70debconf seems to work. At least it worked for me. I am using Ubuntu11.10.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • nema

    chroot@siduxbox:#touch /etc/apt/apt.conf.d/77-NOtraslation
    chroot@siduxbox:#echo "
    >     Acquire {
    >                Languages "none";
    >     };
    > " > 77-NOtraslation
    chroot@siduxbox:# cat 77-NOtraslation
        Acquire {
                   Languages none;
        };
     
    update etc etc…
    ¡voilà!
     

    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.