grml-live
grml-live copied to clipboard
Clean up locales
Just noticed that grml-full
generates 83 locales which consumes nearly 42MB:
root@grml ~ # grml-version
grml64-full_testing build3165 Release Codename autobuild-build3165 [2020-06-24]
root@grml ~ # grep -v "^#" /etc/locale.gen | wc -l
83
root@grml ~ # l /usr/lib/locale
total 40508
drwxr-xr-x 3 root root 236 Jun 24 04:04 C.UTF-8
-rw-r--r-- 1 root root 41479488 Jun 24 04:22 locale-archive
Removing all locales except en_US.UTF-8
drops the disk usage to about 3MB:
root@grml ~ # echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
root@grml ~ # locale-gen
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
root@grml ~ # l /usr/lib/locale
total 2892
drwxr-xr-x 3 root root 236 Jun 24 04:04 C.UTF-8
-rw-r--r-- 1 root root 3035216 Jun 24 18:58 locale-archive
I believe GRMLBASE and GRMLFULL (in https://github.com/grml/grml-live/tree/master/etc/grml/fai/config/files/etc/locale.gen) should only provide en_US.UTF-8
as we use localepurge which is configured to remove all locales except en_US.UTF-8
and en
.