RH: How do I reduce the size of locale-archive

What to do whenyou have the idea that the file [ locale-archive ] is too big :

$ ls -la /usr/lib/locale/locale-archive
-rw-r–r–. 1 root root 99158576 Nov 28 09:10 /usr/lib/locale/locale-archive

You can list the currently installed locales with

$ localedef –list-archive

aa_DJ
aa_DJ.iso88591
aa_DJ.utf8
aa_ER
aa_ER.utf8
…..
…..
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.iso88591
zu_ZA.utf8

Now you can remove the locale you do not need ( I will remove all locales except for the English and Dutch locales )

# localedef –list-archive | egrep -v -i “^en|^nl” | xargs localedef –delete-from-archive

 

 

Leave a comment

Your email address will not be published.


*


Fix this before you comment on this post * Time limit is exhausted. Please reload the CAPTCHA.

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