Page 1 of 1

Xubuntu: Purge unneeded locales frees time and space

Posted: Fri Dec 20, 2024 12:38 am
by peter_b
In `/var/lib/locales/supported.d` there are textfiles for each language code.
By default (on ubuntu) there's a file called "en".

And it contains "English" locales:

Code: Select all

en_HK.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_IN UTF-8
en_IL UTF-8
en_ZM UTF-8
en_ZW.UTF-8 UTF-8
en_NZ.UTF-8 UTF-8
en_PH.UTF-8 UTF-8
en_NG UTF-8
en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
en_AU.UTF-8 UTF-8
en_SG.UTF-8 UTF-8
en_BW.UTF-8 UTF-8
en_AG UTF-8
en_ZA.UTF-8 UTF-8
en_CA.UTF-8 UTF-8
en_IE.UTF-8 UTF-8
I've created a new file called `/var/lib/locales/supported.d/de` next to it, and saved it like this:

Code: Select all

de_AT.UTF-8 UTF-8
And removed all but en_US and en_GB in the "en" file.

Then reinstalled the locale package, forcing it to rebuild and purge locales:

Code: Select all

sudo apt upgrade --reinstall locales
Freed up around 300 MB on my Xubuntu 20.04.6.