Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How would I automatically run a script after the apt-get actions dist-upgrade, install, remove and purge? Is there a suitable way of hooking into the APT lifecycle and run a custom script?

share|improve this question
Why don't you use aliases or include apt-get in a/your custom script ? – user55822 Oct 20 '12 at 8:21
Thanks for this question. I want to know how too – Suhaib Oct 20 '12 at 14:51
I'm looking for this answer too, except with apt-get update. @user55822, one reason would be because aliases only apply to your personal bash sessions. Therefore, anything besides you actually running apt-get update in a terminal (e.g. the update cron job, synaptic, etc.) won't make your script run. – strugee Mar 20 at 4:33

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.