How to find the installed language packs and uninstall some of them?

How to find the installed language packs and uninstall some of them?

You could get a list of them using yay:

yay language pack | grep Installed
1 Like

Language independently:

LANG=C yay -Ss language pack | grep -i installed | awk '{print $1}'

lists language packs (including the repo name).

1 Like

It’s not really clear to me what you actually mean by language packs …

If you haven’t installed these “language packs” yourself, there shouldn’t be much unnecessary language related overhead on your system taking up space and/or slowing down your system; if that’s your fear.

Maybe you actually mean “locales” (a set of parameters that defines the user’s language, region and any special variant preferences that the user wants to see in their user interface)?

For a list of enabled locales, run
locale -a

1 Like

Maybe, I asked the question incorrectly. I was interested in all kinds of unnecessary fonts of different languages that get installed.

See here. To list installed fonts for a particular language, issue a command fc-list :lang="two letter language code", e. g. for English run

fc-list -f '%{file}\n' :lang=en

[Edit]
Note that a single font could be used by multiple languages. To list all fonts that refer to English AND German AND French for example, run

fc-list -f '%{file}\n' :lang=en,de,fr
Note that this is an AND, not OR operator!

To count how much entries get returned, run
fc-list -f '%{file}\n' :lang=en | wc -l


Assuming they were installed properly with pacman, you can remove them with pacman.
On my systems LaTeX pulls in quite a lot of fonts (texlive-fontsextra ~1.4GB). But considering the size of an average font I would never bother in hunting down “unused” fonts and removing them manually. I would discourage you from from doing this too :wink: ; there probably will only be some hurt waiting for you in the long run if you don’t let pacman handle the removal.


[Edit]
Typical locations for fonts are
/usr/share/fonts/
~/.local/share/fonts/
/usr/share/texmf-dist/fonts/ (for LaTeX)

To check the overall size these fonts take up on your system, run
du -sh --apparent-size /usr/share/fonts/; du -sh --apparent-size ~/.local/share/fonts/; du -sh --apparent-size /usr/share/texmf-dist/fonts/

To check the subfolder size these fonts take up on your system, run
du -sh --apparent-size /usr/share/fonts/*; du -sh --apparent-size ~/.local/share/fonts/*; du -sh --apparent-size /usr/share/texmf-dist/fonts/*

asian fonts sudo pacman -R noto-fonts-cjk will free 291.9 MiB :vulcan_salute:

1 Like

Note that to properly render fonts for multilingual websites like Wikipedia or the Arch Linux wiki for instance, you may still need certain fonts.