Is it possible to limit the set of English locales on a system?
With Debian
You can do:
dpkg-reconfigure -plow locales
With Ubuntu
The Debian solution doesn't work with Ubuntu, probably because the locales
package comes from the langpack-locales
source instead of glibc
or eglibc
. But you can choose which language-pack-*
package to install.
For finer configuration, you might want to modify files under the /var/lib/locales/supported.d
directory (e.g. /var/lib/locales/supported.d/en
for en
-based locales); for instance, you can remove lines corresponding to locales you don't want. Then run dpkg-reconfigure locales
. Warning: These files are not conffiles, so that you are not supposed to modify them (in particular, your changes may be overwritten after an upgrade). Otherwise, this appears to work.
Alternatively, you can remove the language-pack-*
packages that install locales you don't want, and specify additional locales to /var/lib/locales/supported.d/local
(using the same format); see the Ubuntu help on (re-)generating locales for more information. However the language-pack-*
packages don't just compile locales, but also provide translations, and you may miss them.