Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

At some point in my installation, I must've selected several languages as default. When I run sudo apt-get update, I got output similar to the following.

Ign http://ppa.launchpad.net quantal/main Translation-en_NZ
Ign http://ppa.launchpad.net quantal/main Translation-en_GB
Ign http://ppa.launchpad.net quantal/main Translation-en_CA
Ign http://ppa.launchpad.net quantal/main Translation-en_AU
Ign http://ppa.launchpad.net quantal/main Translation-en

I want to make apt-get only search for en_AU, en_GB and en. i.e. I want to remove en_NZ and en_CA. When I run locale, I indeed get the output LANGUAGE=en_AU:en_NZ:en_GB:en_CA:en. I modified my ~/.profile to change

export LANGUAGE="en_AU:en_NZ:en_GB:en_CA:en"

to

export LANGUAGE="en_AU:en_GB:en"

then rebooted. Now, locale shows only the three languages as expected, but when I run sudo apt-get update, I still see en_CA being searched for. Oddly enough, I get the following output too.

$ apt-config dump | grep Lang
Acquire::Languages "";
Acquire::Languages:: "en_AU";
Acquire::Languages:: "en";
Acquire::Languages:: "en_GB";
Acquire::Languages:: "none";
Acquire::Languages:: "en_CA";

so it seems that apt-get is looking elsewhere for the en_CA entry. The problem is that I cannot find where this could be. I don't quite understand the man page of apt-config, but $APT_CONFIG is empty, /etc/apt/ doesn't contain a file named apt.conf, nor do I get anything recursively grepping this directory for en_CA. So my question is… how can I make apt-get forget about en_CA?

share|improve this question
    
You wrote "I modified my ~/.profile" but my .profile has this comment at the beginning: "This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists." So maybe you want to check for that? –  user25656 Jan 17 '13 at 3:27
    
Neither of those two exist for me. Also, since the output of locale changed after I modified ~/.profile, I assume that bash is reading it fine. –  Sparhawk Jan 17 '13 at 3:30

1 Answer 1

up vote 1 down vote accepted

You have leftover files in /var/lib/apt/lists/ from when you had changed the locales. Apt.conf is not used anymore, but Apt is building the config database from that list of files (among other things). If you look in the dir, you will see files with "translation" and "en_CA" in the name. The Ign messages are simply Apt telling you that the files are not needed and are being ignored. Harmless, but very annoying.

You could remove the orphaned files safely by hand, but it's much easier to remove all of the lists and rebuild them.

sudo rm /var/lib/apt/lists/* -vf && sudo apt-get update
share|improve this answer
    
Excellent! Rebuilding that directory fixed it for me. I was trying to reduce the time it took to update, since I figured apt-get was looking for unnecessary files, but perhaps that's not the case. All the en_NZ entries did say Ign, but there were two en_CA entries with Hit. Is that saying that these repository are being searched? –  Sparhawk Jan 17 '13 at 4:50

Your Answer

 
discard

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.