Configure Apt-Get to Send Update Email Notifications

Last week we looked a YUM’s update settings and found a way to make it send email notifications when updates are available. You can accomplish the same setup with APT for Debian-based Linux distributions. The benefit of doing this is to have apt-get do nothing but notify you when updates are available, rather than automatically installing them. This gives you the ability to still keep your system up-to-date, while also giving you the flexibility to decide when to run updates.

The first thing you should do is install apticron. Apticron is a little tool that is designed to do exactly what you need: notify you when updates are available. To install it, run the following commands:

# apt-get update
# apt-get install apticron

Next, edit the apticron configuration file and tell it where to send the update notifications.

# vi /etc/apticron/apticron.conf

Then, edit the following line:

EMAIL=”name@domainname.tld”

Save and exit. The file /etc/cron.daily/apticron will now perform daily checks for new updates and notify you whenever they are available. This is an easy way to make sure you know when security updates are available but also still have the choice about when to actually run the updates, which can take CPU power and time. To be on the extra safe side, you can also subscribe to Debian’s security RSS feed or their mailing list.

Related Posts











Comments: