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


I have customized an application startup script. Unfortunately, it gets overwritten every time I do

apt-get dist-upgrade

when there is an update available (quite often).

Now I have written a script that makes a backup copy of the original, then modifies the original and merges my changes.

Now my question: How can I trigger a script execution after a package has been updated ?

share|improve this question

If this is an init script, you can usually make your tweaks in /etc/default/$PKG_NAME. Otherwise, you can use dpkg-divert to stop dpkg from touching the file.

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.