Home / Alt manpages / update-dictcommon-aspell(8)

  • update-dictcommon-aspell(8)
  • Admin command
  • linux

Safely Rebuild the dictionaries-common Aspell Database

You will learn when to run update-dictcommon-aspell, what it rebuilds, and how to check the installed version without accidentally invoking a system-wide maintenance operation. The command belongs to the Debian dictionaries-common package, and the installed package here is version 1.29.7.

Allow about ten minutes for inspection and a little longer if the rebuild itself is necessary. You need a shell, the dictionaries-common package, and elevated privileges for the actual command. This guide treats the command as a recovery or package-maintenance tool, not as a harmless status query.

1. Understand the command's job

update-dictcommon-aspell has no options in its documented synopsis:

update-dictcommon-aspell

Its job is to rebuild the Aspell database and supporting files used by SquirrelMail, Jed and Emacs. The manual says it is called from an Aspell dictionary package's postinst or postrm maintainer script. That context explains the warning in the manual: this is a low-level package operation, not a general-purpose command for changing one spelling dictionary.

The installed Perl script confirms the broad sequence. It checks for the required privilege, updates the Aspell database, rebuilds editor and SquirrelMail support, cleans orphaned removal files, and finally runs aspell-autobuildhash. Those steps can write under system directories and may take longer than an ordinary query.

2. Check the package before touching anything

These are read-only checks and do not need sudo:

$ command -v update-dictcommon-aspell
/usr/sbin/update-dictcommon-aspell
$ dpkg-query -W -f='${Package} ${Version}\n' dictionaries-common
dictionaries-common 1.29.7

Your path and version may differ. The first line tells you which executable would run; the second records the package version that defines its local behaviour.

Checkpoint

If the command is absent, stop here. Do not copy a script from another machine into /usr/sbin. Find which package supplies the command and repair that package through your normal package-management process instead.

3. Confirm the alias you were given

update-default-aspell is the older name listed for this guide. On this installation both names are present, and their installed manual pages have the same content. Check the second name if a package hook or an old runbook uses it:

$ command -v update-default-aspell
/usr/sbin/update-default-aspell
$ man 8 update-default-aspell

The alias does not add a different documented mode or a different set of flags. Use the name already present in the package hook or diagnostic message, but expect the same rebuild behaviour. Avoid passing arguments: the synopsis does not document any, and an undocumented argument is not a safe way to select a narrower operation.

4. Decide whether a rebuild is justified

Run the command when a dictionary package's installation or removal needs to finish its registered database and integration work, or when package-maintenance diagnostics specifically identify this rebuild. It can be reasonable after repairing an interrupted package transaction.

Do not run it merely to ask whether Aspell works. For a normal spelling check, use the relevant aspell command. This utility does not report a simple health status, and it is not a switch for selecting the default dictionary.

Warning

The rebuild changes system-managed data and invokes other helpers. It may affect applications that read the generated dictionaries or editor integration. Do not run it during a package transaction you are not already repairing, and do not use it as an untested production troubleshooting step.

5. Run the rebuild only with an explicit maintenance reason

If you have confirmed the reason and have a maintenance window, use the command as root. The command has no useful dry-run or selective-dictionary option in its manual:

$ sudo /usr/sbin/update-dictcommon-aspell

There is no fixed success message promised by the manual, so do not write a script that waits for a particular line of output. The useful result is the exit status and any diagnostic text. Capture both in an administrative record if this is part of an incident:

$ sudo /usr/sbin/update-dictcommon-aspell
$ status=$?
$ printf 'update-dictcommon-aspell exit status: %s\n' "$status"
update-dictcommon-aspell exit status: 0

A zero status means the command completed successfully. A non-zero status means that a step failed; keep the complete error output, including the name of any helper that failed. Do not suppress it with 2>/dev/null.

6. Verify the package state afterwards

First check that the package still reports as installed:

$ dpkg-query -W -f='${Status} ${Version}\n' dictionaries-common
install ok installed 1.29.7

Then repeat the command lookup and test the application that originally exposed the problem. For a dictionary-specific problem, select the affected dictionary explicitly in your normal Aspell test rather than assuming that a successful rebuild changed the default:

$ command -v aspell
/usr/bin/aspell
$ printf '%s\n' 'spelling check' | aspell --lang=en_GB list

The list output depends on the installed word list, so an empty result is not by itself a failure. Compare it with the original symptom and with the dictionary package's own files.

If the rebuild fails, there is no single undo command documented for it. Do not delete cache files or generated dictionaries by hand. Preserve the error, finish or repair the interrupted package transaction using your distribution's package tools, and rerun the package's documented maintenance action once the reported cause is fixed.

Done means

  • You recorded the installed dictionaries-common version and executable path.
  • You confirmed that the request really requires a rebuild, rather than a routine Aspell query.
  • You ran the command only with the required privilege and a clear maintenance reason.
  • You checked its exit status and kept any diagnostic output.
  • You confirmed the package remains installed and retested the original dictionary problem.