dpkg-trigger - Linux


dpkg-trigger is an administrative command in the Debian package management system responsible for activating events or hooks related to package installation, removal, or upgrades.


dpkg-trigger [-f file] [-i location] [-g group] [-j] [-w] [-C path] [-A architecture] [-T text] [-D feature] [-E err_code] [-N] [-T text] [-p policy] [-U]


  • -f file: Specify a configuration file to use.
  • -i location: Set the package installation location.
  • -g group: Trigger an event based on a specific event group.
  • -j: Trigger job events.
  • -w: Wait for the trigger process to finish.
  • -C path: Read the trigger configuration from path.
  • -A architecture: Trigger events for a particular architecture.
  • -T text: Print only matching triggers.
  • -D feature: Trigger events only for a specific feature.
  • -E err_code: Trigger events based on an error code.
  • -N: Simulate trigger invocation without actual execution.
  • -p policy: Define a triggering policy.
  • -U: Update trigger configuration.


Trigger an event group on package installation:

dpkg-trigger -i install

Trigger all events for a specific architecture:

dpkg-trigger -A i386

Common Issues

  • Ensure that you have sufficient permissions to execute the command.
  • Verify that the trigger configuration file is correctly set up.
  • If expected events are not being triggered, check the trigger configuration or the package status.


dpkg-trigger can be integrated with other tools for automated event handling:

  • Cron jobs: Schedule regular trigger invocations.
  • Package management scripts: Invoke triggers as part of post-installation or upgrade routines.

Related Commands

  • dpkg: Package management command.
  • dpkg-reconfigure: Reconfigure installed packages.
  • dpkg-query: Query package information.