Packages
dpkg-trigger
Activate dpkg triggers for deferred package operations.
Additional Notes
dpkg-trigger manually activates a dpkg trigger from the command line. Triggers are a mechanism in Debian packaging that allows one package to cause another package to perform an action at a later time, typically during a dpkg run. This is used for operations that must happen after related packages are processed, such as rebuilding shared library caches or updating font indexes.
Normally triggers are activated automatically by dpkg when certain files are installed. However, dpkg-trigger can activate a trigger explicitly, which is useful during manual package operations, testing, or when a trigger needs to be fired outside of a normal dpkg transaction.
Syntax
dpkg-trigger [options] trigger-name
Parameters
trigger-name: The name of the trigger to activate (as declared in the package's control file).
Common Options
--by-package package: Specify the package name that is activating the trigger.--no-await: Do not wait for the triggered processing to complete.--await: Wait for the triggered processing to complete (default).--check-supported: Check whether the running dpkg supports triggers.
Examples
dpkg-trigger --by-package myapp myapp-trigger
Activate the myapp-trigger trigger on behalf of myapp.
dpkg-trigger noawait ldconfig
Activate the ldconfig trigger without waiting for processing.
Practical Notes
- Most users never need to invoke
dpkg-triggerdirectly; it is primarily for package maintainers and debugging. - Common triggers include
ldconfig(shared library cache),man-db(manual page index), andfontconfig(font cache). - The
noawaitvariant (dpkg-trigger noawait trigger) allows parallel trigger processing. - To see which triggers a package supports, examine the
DEBIAN/triggersfile inside its.debarchive. - Triggers are processed at the end of a dpkg run, not immediately upon activation.