How to Remove Unwanted/Unneeded Language Packs for Libre Office in Debian-Based Linux Distributions

LireOfficeWrite

Lately, when updating our “mostly” Debian-based Linux devices, I have noticed that it takes quite a bit of extra bandwidth and time to update all the extra language packs and help support packages for Libre Office. To save bandwidth, disk space, and time, I have chosen to eliminate the language packages and help files that me and my family do not use.

In order to accomplish this, it was necessary to do a bit of editing an apt package manager console command to turn this into a “one liner” that could just do all of the appropriate package removal cleanly, and efficiently. To save myself and others time and effort in the future, I have saved, and am sharing the command that will do this.

It is important to note that Libre Office in Debian-based distributions installs the U.S. English language by default, which is included in the ‘libreoffice-common’ package. While one “could” just remove all of the extra language packages and help files with this short command:

sudo apt purge libreoffice-l10n-* && sudo apt autoremove

That would force you to have to install the language support of your choice after the fact, and would add an unnecessary step to the process. If you use the following command,:

sudo apt purge libreoffice-l10n-ar libreoffice-l10n-ar libreoffice-l10n-ast libreoffice-l10n-be libreoffice-l10n-bg libreoffice-l10n-bn libreoffice-l10n-bs libreoffice-l10n-ca libreoffice-l10n-cs libreoffice-l10n-cy libreoffice-l10n-da libreoffice-l10n-de libreoffice-l10n-dz libreoffice-l10n-el libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-eo libreoffice-l10n-es libreoffice-l10n-et libreoffice-l10n-eu libreoffice-l10n-fa libreoffice-l10n-fi libreoffice-l10n-fr libreoffice-l10n-ga libreoffice-l10n-gl libreoffice-l10n-gu libreoffice-l10n-he libreoffice-l10n-hi libreoffice-l10n-hr libreoffice-l10n-hu libreoffice-l10n-id libreoffice-l10n-is libreoffice-l10n-it libreoffice-l10n-ja libreoffice-l10n-ka libreoffice-l10n-km libreoffice-l10n-ko libreoffice-l10n-lt libreoffice-l10n-lv libreoffice-l10n-mk libreoffice-l10n-ml libreoffice-l10n-mr libreoffice-l10n-nb libreoffice-l10n-ne libreoffice-l10n-nl libreoffice-l10n-nn libreoffice-l10n-pa-in libreoffice-l10n-pl libreoffice-l10n-pt libreoffice-l10n-pt-br libreoffice-l10n-ro libreoffice-l10n-ru libreoffice-l10n-si libreoffice-l10n-sk libreoffice-l10n-sl libreoffice-l10n-sr libreoffice-l10n-sv libreoffice-l10n-ta libreoffice-l10n-te libreoffice-l10n-th libreoffice-l10n-tr libreoffice-l10n-ug libreoffice-l10n-uk libreoffice-l10n-vi libreoffice-l10n-xh libreoffice-l10n-zh-cn libreoffice-l10n-zh-tw && sudo apt autoremove

You can remove all language support packages at once, or just keep your preferred language pack, if it is not US-English, by removing it, and the trailing space behind it, from the above command before you hit the enter key. That way, you eliminate all but the language support packages and help files you want, and using the apt autoremove command, you remove all of the unneeded files that come with them, saving you bandwidth, disk space, and time, not only for the current moment, but for the future as well.

Please note that I did not leave the -y in the above commands, so that you can see what packages will actually be removed before you run the command chain, so that you don’t accidentally BORK your system. If you see that it will remove wanted packages, you can edit the commands so that it doesn’t behave badly. I ran the above command on several devices on my network, and it did exactly what it was supposed to do without any hitches or hiccups, but YMMV. Also, I thought is was important to note that I saved 1.1GB of disk space on each of the systems I performed this file purge on.

Hope this helps folks save some bandwidth, disk space, editing, time, and typing! Until next time, Have a Great Day! 🙂

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *