Thunderbird - remove unused dictionaries from menu

I use Thunderbird with two sets of dictionaries: English and Spanish. In the spell checker menu I find about 30 localized dictionaries (all Spanish-speaking countries, and for English: US, England, Canada).

It's quite annoying that every time I need to look for the single proper dictionary, I see all this heap of other dictionaries (useless for me).

Is there any way to remove the unused dictionaries from the menu and leave 2 or 3 that I really use?


Solution 1:

The solution I found is delete unused dictionaries from /usr/share/myspell/dicts.

*.dic and *.aff files, and leave only the three languages I use: en-US.dic, en-US.aff, es.dic, es-ES.dic, es-ES.aff.

Backup the whole directory before delete anything.

Solution 2:

What I did:

  1. Deleting the dictionaries symbolic link in /usr/lib/thunderbird/
  2. Installing the dictionaries manually (Tools > Options or Edit > Preferences, then Composition, and click on Download More Dictionaries).
  3. Adding a dpkg-divert rule to prevent the link to be restored each time Thunderbird is updated.

From a command line, type:

sudo rm /usr/lib/thunderbird/dictionaries
sudo dpkg-divert --no-rename --add /usr/lib/thunderbird/dictionaries

And then install the dictionaries you want in Thunderbird as explained above.

Solution 3:

According to https://askubuntu.com/a/301951, there are two locations:

  1. /usr/share/hunspell/
  2. /home/me/.thunderbird/o5sgu7z7.default/extensions (o5sgu7z7 will be different in your case)

Solution 4:

On my system I had a whole bunch of hunspell-en-* packages installed. The following command got rid of them and these dictionaries disappeared from the menu:

sudo apt purge hunspell-en-ca hunspell-en-gb hunspell-en-za

Solution 5:

A first, likely simpler solution can be achieved by GUI on some systems. Check for a menu like "language settings" and a point "supported languages". There you can remove whole languages in one go.

For more fine grained control (e.g. removing language dialects) see below.

A full solution can be found by combining the existing answers:

There are multiple locations for the languages (dictionaries):

  • /usr/share/myspell/dicts
  • /usr/share/hunspell
  • /usr/lib/thunderbird/dictionaries (which is just a symlink to /usr/share/hunspell)

(from Ringtail, Chris and Calimos answer)

These are system installed dictionaries. So to cleanly remove them you have to sudo apt remove the packages that installed the files. To find out which packages those reside in you can use apt-file search <path/to/file>.

Relevant packages are:

  • mythes-*
  • hyphen-*
  • hunspell-*

You can put all 3 into a sudo apt remove, check the matches before confirming (WARNING: confirming it would remove ALL dictionaries which is usually not what you want) and abort. Then copy&past the relevant packages into a fresh command.

Alternatively start with e.g. sudo apt remove hunspell-<TAB> and let autocompletion list the installed packages.

Example:

sudo apt remove hunspell-ru hyphen-ru mythes-ru

This would remove all russian language stuff.