dpkg-trigger(1)

๐Ÿ’… dpkg-trigger(1) โ€” the dpkg suite's own trigger utility, bestie

Okay so welcome to dpkg-trigger(1), straight out of the dpkg suite โœจ this is the page where we learn how to poke triggers on purpose. Buckle up ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

dpkg-trigger [option...] trigger-name

dpkg-trigger [option...] command

๐Ÿ’– DESCRIPTION ๐Ÿ’–

dpkg-trigger is the tool that lets you explicitly activate triggers and also check whether the dpkg you're running even supports them. Two jobs, one slay little binary ๐Ÿซถ

So why would you need this? Because maintainer scripts sometimes get into complex and conditional situations where file triggers โ€” or the declarative activate triggers control file directive โ€” are just not rich enough. Like, they tried their best, but no ๐Ÿ˜ญ It's also handy for testing, and for system administrators, but heads up: the triggers won't actually be run by dpkg-trigger, bestie. It activates, it doesn't execute. Know the difference ๐Ÿ’…

Also, if you feed it an unrecognized trigger name syntax, that's an error. Not a vibe. It will not be chill about it.

This program was introduced in dpkg 1.14.17 โญ (so she's an icon, she's a legend, she's been here a while).


๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

  • --check-supported โ€” Checks if the running dpkg supports triggers (usually called from a postinst). Exits 0 if a triggers-capable dpkg has run, or 1 with an error message to stderr if not. Normally though? It's better to just activate the trigger you want with dpkg-trigger and move on. Periodt.
  • -?, --help โ€” Shows the usage message and exits. Our little cry for help ๐Ÿฅบ
  • --version โ€” Shows the version and exits. Main character reveal ๐ŸŒˆ

โœจ OPTIONS โœจ

  • --admindir=dir โ€” Changes the location of the dpkg database. Defaults to /var/lib/dpkg if DPKG_ADMINDIR has not been set. Moving house, but make it databases ๐Ÿ 
  • --root=directory โ€” Sets the root directory to directory, which sets the administrative directory to ยซdirectory/var/lib/dpkgยป. Supported since dpkg 1.21.0 ๐Ÿฆ‹
  • --by-package=package โ€” Overrides the trigger awaiter (normally set by dpkg through the DPKG_MAINTSCRIPT_PACKAGE environment variable of the maintainer scripts, naming the package to which the script belongs, and this will be used by default). Basically: overriding who's waiting on this, iykyk ๐Ÿ’…
  • --no-await โ€” This option arranges that the calling package T (if any) need not await the processing of this trigger; the interested package(s) I, will not be added to T's trigger processing awaited list and T's status is unchanged. T may be considered installed even though I may not yet have processed the trigger. She's not waiting around, she has things to do ๐Ÿ’€
  • --await โ€” Does the inverse of --no-await. If the interested package has declared a โ€œnoawaitโ€ directive, then this option will not be effective. It is currently the default behavior. Supported since dpkg 1.17.21 ๐ŸŒธ
  • --no-act โ€” Just test, do not actually change anything. The "look but don't touch" of flags ๐Ÿ™ˆ

๐Ÿ”ฅ EXIT STATUS ๐Ÿ”ฅ

  • 0 โ€” The requested action was successfully performed. Or a check or assertion command returned true. Slay โœ…
  • 1 โ€” A check or assertion command returned false. Rip ๐Ÿ˜ญ
  • 2 โ€” Fatal or unrecoverable error due to invalid command-line usage, or interactions with the system, such as accesses to the database, memory allocations, etc. Bad vibes only ๐Ÿ’€

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • DPKG_ROOT โ€” If set and the --root option has not been specified, it will be used as the filesystem root directory. Supported since dpkg 1.21.0 ๐Ÿงš
  • DPKG_ADMINDIR โ€” If set and the --admindir option has not been specified, it will be used as the dpkg data directory. ๐Ÿ“
  • DPKG_DEBUG โ€” Sets the debug mask from an octal value. The currently accepted flags are described in the dpkg --debug option, but not all these flags might have an effect on this program. Supported since dpkg 1.21.10 ๐Ÿ”
  • DPKG_COLORS โ€” Sets the color mode. The currently accepted values are: auto (default), always and never. Supported since dpkg 1.18.5 ๐ŸŽ€ (aesthetic matters!)
  • DPKG_NLS โ€” If set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support. The accepted values are: 0 and 1 (default). Supported since dpkg 1.22.7 ๐ŸŒ

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹


๐Ÿ’œ Friendly reminder bestie: dpkg-trigger activates triggers and checks support โ€” it does not run them. Don't come for me when the trigger hasn't fired, I warned you ๐Ÿซถ

Anyway, that's the whole page! This masterpiece is from the 1.23.11-dirty era, dated 2026-09-09, and it's brought to you by the dpkg suite itself. Go activate something cute โœจ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from