19

I noticed I have several unneeded locales installed.I only need one locale.

How to remove all the rest?

The locales are for example firefox-locale-?

  • Why do you want to remove them? Please see my answer below. – Gunnar Hjalmarsson Jun 7 '14 at 8:42
  • 1
    Same here. I don't need 50 languages worth of clutter taking up precious SSD space, not to mention filling up the backup drive. – SDsolar Aug 16 '17 at 22:15
14

First type the locale command to print-out your current locale configuration. Also you can use locale -a to display a list of all available locales.

Cleaning up unused locales

Install localepurge to remove any unwanted languages, while choosing the ones you want to keep. Note that this method will not change the locales settings on your system. It will just purge the locales you have not selected. Use at your own risk.

$ sudo apt-get install localepurge

After that, you could reboot or try to run . /etc/default/locale.

To reconfigure this, simply enter the following in terminal:

$ sudo dpkg-reconfigure localepurge

Another way answered here is to sudo locale-gen --purge <locales YOU WANT TO KEEP>

Reference

  • 2
    Quoting localepurge man page: "Please note, that this tool is a hack which is not integrated with Debian's package management system [...]" – sevo Sep 23 '17 at 17:39
  • none of these things seem to actually remove any files. /usr/share/man still has all the languages. /usr/share/locale still has all the directories. – kristopolous Aug 27 '18 at 6:55
5

Unless you have a need to switch to various locales all the time, you can uninstall the unused locales and free up some amount of the storage space in your system.

Install Localepurge via the terminal:

sudo apt-get install localepurge

Once the installation is done, it will remove all locale files from your system that you have no need for.

-2

Why remove all the rest? I suppose you are talking about the various English locales and language packs.

Removing them is pointless, since they will be recreated at the next update of the language packs. firefox-locale- will be recreated at the next firefox update.

So I would recommend that you try to realize that they don't hurt and spend your time on something more useful. ;-)

  • 7
    So bloat? Such space? Very speed? – user289256 Jun 7 '14 at 18:57
  • 1
    @user289256: Well, locales and language packs that are not used don't affect speed. Also, we are not talking about a huge amount of data, so if space is a real problem for you, you have a problem regardless. – Gunnar Hjalmarsson Jun 7 '14 at 19:39
  • 3
    For me, I need to switch very often between two locales in Firefox textboxes (spellcheck) and those five unnecessary locales are getting in the way of doing this quickly and mindlessly. I found that removing ubuntu hunspell and/or myspell packages is what I needed to do. – okolnost Jan 16 '15 at 11:49
  • 2
    It is, often, a serious pain... The extra LOCALE. Such as, pulling (spell-check) dictionaries for various software; one example of this is Firefox, i.imgur.com/Srs3nio.png (Where, I'd like to ONLY have en_US and none other - after years of using various _nix operating systems - I'm, still, very much a -total- n00b & my box is jammed-packed-full of LOCALE and languages which are creating various problems and such, bah. :)) – Nostromov Aug 12 '16 at 21:26
  • 4
    @GunnarHjalmarsson, If you don't know how to help, spare us the trouble and remain quiet. I find very arrogant to assume that people have plenty of space. Perhaps you're the lucky one so stuff your terabytes while we modest people try make do with little. There are useful little devices, like my eee PC, which do an amazing job even with just a few GB. – Rbjz Jun 3 '17 at 9:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.