How to run a command or script after running apt-get command on a Debian or Ubuntu Linux

By | 2016-02-22

How do I run custom command after ‘apt-get upgrade‘ or ‘apt-get dist-upgrade‘ on a Debian or Ubuntu Linux based system? How do I hook a script to apt-get command on my Ubuntu Linux server?

You can configure the apt-get command using /etc/apt/apt.conf file or place configuration in a special directory at /etc/apt/apt.conf.d/.

More in nixCraft.