The test case helps to check how to install or uninstall locales individually.
Note: Live ISO has glibc-all-langpacks default installed. To execute below test, Install Live ISO, then remove
$dnf remove glibc-all-langpacks and then proceed for below steps.
How to test
dnf install glibc-langpack-<lang_code>to install package containing locales for your language. Example:
dnf install glibc-langpack-frto install locales from French.
locale -ato check the French locales this has installed.
- You can remove this locale by
dnf remove glibc-langpack-fr
- Installing the meta packages langpacks-<lang_code> should automatically install the respective glibc packages. Run
dnf install langpacks-<lang_code>. For example:
dnf install langpacks-frfor French. This will install few packages useful for French including glibc-langpack-fr
- To remove : Run
dnf remove langpacks-fr. This will remove few packages from French including glibc-langpack-fr.
- All the available locales can be installed into /usr/lib/locale/locale-archive by installing glibc-all-langpacks package :
dnf install glibc-all-langpacks; all available locales will be installed into /usr/lib/locale/locale-archive. Run
locale -agives a very long list as output. Run
locale -agives count more than 800 lines.
NOTE: In addition to glibc-all-langpacks, individual locale package glibc-langpack-fr, maybe installed. But but as long as glibc-all-langpacks is installed, they are redundant and waste a bit of disk space, thus only the locales from /usr/lib/locale/locale-archive are used in that case.
- While executing all the above commands, please make sure that other locales, especially custom locales added by the user, are not affected. If no custom locale installed, then please ignore below steps. Else, For example:
- If you have installed the locale sources with
- Create a locale with a custom name :
sudo localedef --no-archive -i de_DE -f UTF-8 xx_YY.utf8
- There is a folder /usr/lib/locale/xx_YY.utf8/ that exists.
locale -a, to see that such a locale is available and LC_ALL=xx_YY.UTF-8 locale -k language, shows that the language of this custom locale is "German". As long as the folder name of such a user locale does not conflict with a folder name in any of the glibc-langpack-<language> packages, there should be no problem of installing and removing any of the glibc-langpack-<languages> and/or glibc-all-langpacks packages, that user defined locale should be available no matter how many of the glibc-langpack-<language> or glibc-all-langpacks packages are installed.
- The desired individual locale for your language should be installed
- The system must be functioning without any locale related error