Home / Alt manpages / remove-default-ispell(8)

  • remove-default-ispell(8)
  • Admin command
  • linux

Safely Remove an Ispell Dictionary from dictionaries-common

You will understand when remove-default-ispell should run, what it removes, and how to verify the package state without accidentally editing the dictionaries-common database by hand. On this machine it comes from dictionaries-common version 1.29.7. Allow about ten minutes for a read-only review, or longer if you are maintaining a Debian package.

Warning

The installed manual explicitly says not to use this command from an interactive shell unless you know very well what you are doing. It is a package-maintainer helper, not a general-purpose dictionary removal command. The example that changes state belongs in a package's postrm script and requires package-maintainer privileges.

1. Check which helper you have

Confirm that the command is installed and identify the package version. These checks do not change 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 is installed under /usr/sbin, which is a useful clue about its administrative role. The version matters because this guide describes the local manual, dated 7 September 2023, and the installed package. Do not copy examples from another release and assume that its package integration is identical.

2. Understand the only documented argument

The synopsis has 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 the name of a configuration file. The helper removes the entries associated with that Ispell package from the dictionaries-common database. It also 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. If you need to discover the 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 means that 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 can call the helper from its postrm processing, passing its own package name. In that context, the package system is already handling the removal transaction and the helper can keep 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 a command to run: the wrong package name can remove the wrong database entry, while a made-up name can leave the real entry untouched. Review the package's maintainer script and package metadata before changing it.

Checkpoint

Before any maintainer-script change, verify all three facts: the package is the dictionary package being removed, the helper is called during removal rather than installation, and the argument is the package name expected by that package's integration. If any fact 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 associated with the supplied Ispell package. If that package was the default, it calls for a new selection. This 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 also is not a substitute for removing the Debian package. Package removal should be performed by the package manager, which can run 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. The sudo command is state-changing and can remove files and trigger maintainer scripts. Read the proposed transaction before accepting it. Do not run remove-default-ispell separately first, because that can make the database disagree with the package-manager transaction.

5. Verify the result through package state

After a package-managed removal completes, confirm that the package is no longer installed and list the remaining dictionary-related packages. These 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 shows any remaining package names matching the query. Neither command proves which language is currently selected; it only checks package presence. If a dictionary selection prompt appeared during removal, follow that prompt's result rather than assuming the former default is still active.

If the package is still installed, do not call the helper to force the database into a different state. Find 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, then allowing its package integration to register it again and selecting a suitable default when prompted. Keep a record of 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 test it. Those actions can create a state that the package manager and maintainer scripts do not expect. For a harmless review, use man remove-default-ispell, command -v, and dpkg-query; none of them changes the selection.

Done means

  • You confirmed the installed dictionaries-common version and helper path.
  • You treated remove-default-ispell as a package-maintainer helper, not an interactive removal tool.
  • The argument is the exact Ispell dictionary package name.
  • Package removal is performed by the package manager, with its proposed changes reviewed first.
  • Afterwards, package presence and any new dictionary selection have been checked separately.