Safely Remove an Ispell Dictionary with remove-default-ispell
remove-default-ispell is a package-maintainer helper, not something you run by hand to tidy up dictionaries. It is called from a package's postrm script when an Ispell dictionary package is removed, and it keeps the dictionaries-common database in step with that removal.
The route
Jump straight to the step you need, or tick off Done means at the end.
This guide covers when it runs, what it actually removes, and how to verify package state afterwards without touching the dictionaries-common database directly. On this machine it comes from dictionaries-common version 1.29.7. Allow about ten minutes for a read-only review, longer if you are maintaining a Debian package yourself.
Warning
The installed manual explicitly says not to use this command from an interactive shell unless you know very well what you are doing. The example that changes state belongs in a package's postrm script and needs package-maintainer privileges.
1. Check which helper you have
Confirm the command is installed and note the package version. Neither check changes dictionary selections or package files:
$ command -v remove-default-ispell
/usr/sbin/remove-default-ispell
$ dpkg-query -W -f='${Package} ${Version}\n' dictionaries-common
dictionaries-common 1.29.7
The command lives under /usr/sbin, which is itself a clue about its administrative role. The version matters because this guide describes the local manual, dated 7 September 2023, alongside the installed package: do not copy examples from another release and assume its package integration matches.
2. Understand the only documented argument
The synopsis takes one required argument: the package name of the Ispell dictionary being removed.
remove-default-ispell <package>
Here, <package> is a real Debian package name, not a dictionary language, a path, or a configuration file. The helper removes that Ispell package's entries from the dictionaries-common database, and it requests a new default selection if the removed package was the current default.
There are no documented options in the installed manual: do not invent a dry-run switch, a force switch, or a language argument. To find the right package name, inspect package metadata first:
$ dpkg-query -W -f='${binary:Package}\t${Version}\n' 'ispell*' 2>/dev/null
An empty result is not an error in the command itself: it just means this particular query found no installed package whose name starts with ispell. Use your package manager's normal search and status commands to identify the exact dictionary package instead of guessing from a language name.
3. Keep the operation inside package removal
The supported context is the package's removal maintainer script. A package that owns an Ispell dictionary calls the helper from its postrm processing, passing its own package name. At that point the package system is already handling the removal transaction, and the helper just keeps dictionaries-common's records aligned with it.
A maintainer script would use a concrete package name, for example:
remove-default-ispell dictionary-package-name
Replace dictionary-package-name only with the actual binary package being removed. This placeholder is deliberately not something to run as-is: the wrong package name removes the wrong database entry, while a made-up name leaves the real entry untouched. Review the package's maintainer script and metadata before changing it.
Checkpoint
Before any maintainer-script change, verify three facts: the package is the dictionary package being removed, the helper runs during removal rather than installation, and the argument is the package name that integration expects. If any of that is unclear, stop and consult the package's Debian policy documentation or maintainer.
4. Know what changes and what does not
The helper updates the dictionaries-common database entries for the supplied Ispell package. If that package was the default, it triggers a new selection. That may change which installed dictionary is selected, but it does not install a replacement dictionary, create a language package, or make an unrelated Ispell package the default by magic.
It is also not a substitute for removing the Debian package itself. Package removal should go through the package manager, which runs the relevant maintainer scripts in the correct transaction order:
$ sudo apt remove dictionary-package-name
Replace the placeholder only after checking the package name with dpkg-query or your package manager. That sudo command is state-changing: it can remove files and trigger maintainer scripts, so read the proposed transaction before accepting it. Do not run remove-default-ispell separately first, because that can leave the database disagreeing with the package-manager transaction.
5. Verify the result through package state
Once a package-managed removal completes, confirm the package is gone and list any remaining dictionary-related packages. Both commands are read-only:
$ dpkg-query -W -f='${binary:Package}\t${Status}\n' dictionary-package-name
$ dpkg-query -W -f='${binary:Package}\t${Version}\n' 'ispell*' 2>/dev/null
The first command may report an unknown package after a complete removal, depending on the package manager and its database state. The second lists any remaining package names matching the query. Neither proves which language is currently selected; they only check package presence. If a dictionary selection prompt appeared during removal, trust that prompt's result rather than assuming the old default is still active.
If the package is still installed, do not call the helper to force the database into a different state. Work out why the removal did not complete, then let the package manager finish or repair its transaction. If the selection is wrong after a successful removal, use the dictionaries-common selection mechanism documented for your distribution, not an undocumented option to this helper.
Recovery and boundaries
This helper has no undo command documented in its manual. Recovery means reinstalling the intended dictionary package, letting its package integration register it again, and selecting a suitable default when prompted. Note the package name and the selection you wanted before starting a removal.
Do not edit the dictionaries-common database by hand, pass a filesystem path as the argument, or run the helper against an arbitrary installed dictionary just to see what happens. Those actions can leave a state the package manager and maintainer scripts do not expect. For a harmless review, stick to man remove-default-ispell, command -v, and dpkg-query; none of them changes the selection.
Done means
- Version confirmed: you noted the installed
dictionaries-commonversion and helper path. - Boundary respected: you treated
remove-default-ispellas a package-maintainer helper, not an interactive removal tool. - Argument correct: it is the exact Ispell dictionary package name.
- Removal owned by apt: package removal went through the package manager, with the proposed changes reviewed first.
- State verified: package presence and any new dictionary selection were checked separately afterwards.