I accidentally add a locale, e.g. sudo locale-gen zh_TW
e.g. locale -a
zh_TW
But how to remove it?
Best Answer
I think you can do this by editing /var/lib/locales/supported.d/local and removing that locale. Then run locale-gen to regenerate the compiled locales.
You can check which locales you currently have generated using:
locale -a
You can generate more by editing /etc/locale.gen and uncommenting the lines for the locales that you want to enable. Then you can generate them by running the command:
locale-gen
You can find a list of supported locales in /usr/share/i18n/SUPPORTED
There is more information available on the Debian wiki.
There's not a specific command (or at least, not one that I'm aware of) to get this information, but you can find it between those provided by systeminfo.exe.
Best Answer
I think you can do this by editing
/var/lib/locales/supported.d/local
and removing that locale. Then runlocale-gen
to regenerate the compiled locales.