Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I've understood, the usual "Processing triggers for < packagename >" does some package- and system-specific tasks such as add items to a launch menu or update a configuration file. Is there an actual way to see what exactly is being done or altered during this step? Where can one find the exact behaviour of the step?

share|improve this question
up vote 10 down vote accepted

There is, but it requires digging through some bash scripts for the packages being triggered.

  • Suppose the dpkg output looks like:

    Preparing to replace zim 0.52-1 (using .../archives/zim_0.52-1_all.deb) ...
    Unpacking replacement zim ...
    Processing triggers for shared-mime-info ...
    Processing triggers for menu ...
  • Internally, what dpkg does is call the postinst script for each of these packages with the triggered command-line option, and zero or more trigger options.

  • So, you simply open /var/lib/dpkg/info/PACKAGE.postinst (it's a bash script), and simply look for what happens when $1 is triggered

Example: man-db triggers

One of the most common "Processing triggers" you'll see is for man-db, whenever the package being installed has a man page.

If you open /var/lib/dpkg/info/man-db.postinst, you'll find this section:

if [ "$1" = triggered ]; then
    # We don't print a status message here, as dpkg already said
    # "Processing triggers for man-db ...".
    run_mandb -pq
    exit 0

So you can see that Processing triggers for man-db ... simply results in the run_mandb function (also found in the postinst script) being run with the -pq option.

Helpful Resources:

  1. Trying to make dpkg triggers more useful and less painful
  2. dpkg triggers, the lost how-to document
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.