Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Each time I install or operate in other means l10n-related packages, the APT system "rebuilds" a lot of English locales, which takes considerable time. Look at the APT log:

Configuring language-pack-en-base (1:10.10+20100930) ...
Generating locales...
  en_AG.UTF-8... up-to-date
  en_AU.UTF-8... up-to-date
  en_BW.UTF-8... up-to-date
  en_CA.UTF-8... up-to-date
  en_DK.UTF-8... up-to-date
  en_GB.UTF-8... up-to-date
  en_HK.UTF-8... up-to-date
  en_IE.UTF-8... up-to-date
  en_IN.UTF-8... up-to-date
  en_NG.UTF-8... up-to-date
  en_NZ.UTF-8... up-to-date
  en_PH.UTF-8... up-to-date
  en_SG.UTF-8... up-to-date
  en_US.UTF-8... up-to-date
  en_ZA.UTF-8... up-to-date
  en_ZW.UTF-8... up-to-date
Generation complete.

And this happens for each package.

I don't need all those variants - most of the time I use non-English locale altogether. For me en_US and en_GB would be sufficient.

So my questions are:

  • Are all those en_* variants really installed on my machine? How to check that?

  • If they are, how to cleanly remove them and prevent APT from generating them?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The extent to which the en_* locales actually take up space on your system really depends on the packages you have installed. In general, locale data is stored in /usr/lib/locale.

The last time I checked, changing the locales that are generated was a bit Distro specific.

In Debian:

# dpkg-reconfigure locales

In Ubuntu:

  1. Edit /var/lib/locales/supported.d/en and /var/lib/locales/supported.d/local to only include those locales you want.

  2. Run # dpkg-reconfigure locales

If you want to reclaim the space used by some of those other locales, you can try the localepurge package in Debian or Ubuntu; however, as the man page warns, it can sometimes cause problems.

share|improve this answer
    
Exactly what I wanted! Thanks! –  ulidtko Jan 17 '11 at 18:25

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.