Removing unneeded Firefox ESR language packs on Debian

Josh Sherman
2 min read
Command-line Interface Debian / Ubuntu

I went to run an apt upgrade today and came to realize that I had over 60 language packs for Firefox ESR installed. Seems somewhere along the way I accidentally installed these language packs, or perhaps installed the meta package firefox-esr-l10n-all that pulls in every single language pack that’s available. Or maybe it was part of the default installation and were always hanging around without me noticing.

Regardless, since my system language is English and my computer isn’t shared with a bunch of folks that speak other languages, having all of these additional packages is just overkill. Not just are they unnecessary, that’s a lot of additional packages that need to be downloaded and upgraded.

All right, so the first step here is to get rid of the meta package if it happens to be installed:

% sudo apt remove --purge firefox-esr-l10n-all

For me, that wasn’t the case, but I did want to include it in this particular post.

With that package removed, any language packs associated with it can be easily uninstalled. You could manually go through and cherry pick which language packs you’d like to uninstall, a good choice if you do want to keep one or more of them around.

For me, I didn’t need any of them, so I was able to approach this less manually, but significantly more scorched earth. Even though I didn’t have the meta package installed, I was still able to leverage it to easily get a list of all of the language packs. Here’s how get that information:

# All information about the package
% apt-cache show firefox-esr-l10n-all

# Just the line that lists out dependencies
% apt-cache show firefox-esr-l10n-all | grep Depends

# Take it one step further and scrub it up with sed
% apt-cache show firefox-esr-l10n-all o| grep Depends | sed -n -e 's/^.*://;s/,//gp'

Armed with a list of all of the packages, we can feed that back into apt to remove them all:

% sudo apt remove --purge $(apt-cache show firefox-esr-l10n-all | grep Depends | sed -n -e 's/^.*://;s/,//gp')

You may see some errors if you don’t have every single language pack installed, but they are just warnings and won’t hinder you from removing the ones you do have installed.

Depending on which language packs you had installed, you may also need to remove some other packages that are no longer necessary. You can do that as such:

% sudo apt autoremove
Join the Conversation

Good stuff? Want more?

Weekly emails about technology, development, and sometimes sauerkraut.

100% Fresh, Grade A Content, Never Spam.

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.

Currently Reading

Parasie Eve

Previous Reads

Buy Me a Coffee Become a Sponsor

Related Articles