, Pretty much everything here is done in terminal, so unless it is preceeded by *, it is a command done as root. I use XFCE so I use mousepad as a text editor, but if you use GNOME substitute gedit, if you use KDE substitute kate, and if you use LMDX substitute leafpad. , , , , 1) Install anacron , , - aptitude install anacron , , * This will ensure that the cron scripts are run daily during idle time , , , , 2) Create log files , , , , - mousepad /var/log/apt-safe-upgrade , , * save it as a blank file and exit , , - mousepad /var/log/apt-full-upgrade , , * save it as a blank file and exit , , , , 3) Create the upgrade scripts , , , , - mousepad /etc/cron.daily/apt-safe-upgrade , , * Paste the following: , , , , #!/bin/sh , , echo DQ*********************DQ >> /var/log/apt-safe-upgrade , , date >> /var/log/apt-safe-upgrade , , aptitude update >> /var/log/apt-safe-upgrade , , aptitude safe-upgrade -o Aptitude::Delete-Unused=false --assume-yes >> /var/log/apt-safe-upgrade , , echo DQUpdates (if any) installedDQ >> /var/log/apt-safe-upgrade , , , , * Save the file and exit , , , , - mousepad /etc/cron.monthly/apt-full-upgrade , , * Paste the following: , , , , #!/bin/sh , , echo DQ*********************DQ >> /var/log/apt-full-upgrade , , date >> /var/log/apt-full-upgrade , , aptitude update >> /var/log/apt-full-upgrade , , aptitude full-upgrade -o Aptitude::Delete-Unused=false --assume-yes >> /var/log/apt-full-upgrade , , echo DQUpdates (if any) installedDQ >> /var/log/apt-full-upgrade , , , , * Save the file and exit , , , , 4) Create log rotation files , , , , - mousepad /etc/logrotate.d/apt-safe-upgrade , , * Paste the following: , , , , /var/log/apt-safe-upgrade { , , rotate 2 , , daily , , size 250k , , compress , , notifempty , , } , , , , * Save the file and exit , , , , - mousepad /etc/logrotate.d/apt-full-upgrade , , * Paste the following: , , , , /var/log/apt-full-upgrade { , , rotate 2 , , monthly , , size 250k , , compress , , notifempty , , } , , * Save the file and exit , , , , 5) Make the scripts executable , , , , - chmod +x /etc/cron.daily/apt-safe-upgrade , , - chmod +x /etc/cron.monthly/apt-full-upgrade , , , , 6) Choose settings for configuration files , , , , - mousepad /etc/apt/apt.conf.d/local , , * Paste the following: , , , , Dpkg::Options { , , DQ--force-confdefDQ; , , DQ--force-confoldDQ; , , } , , , , * DQconfdefDQ sets the behavior to use new version when the file wasnt modified, keep old when it was , , * DQconfoldDQ makes it force using the old file if it still wants to prompt for some reason , , * if you want to overwrite the current file by default, replace both with just DQ--force-confnewDQ , , , , Bam, now youre all set up for automatic updates via cron. If you dont believe me, over the next day or two check out /var/log/apt-safe-upgrade and see if it ran! , , , , ** UPDATE FOR LAPTOPS ** , , , , So anacron, being a cron job itself, apparently is deferred when a laptop is running on battery! This means that if you only charge your laptop/netbook while off and only have it on while on battery, this job will never run. The solution (not elegant, but it works) is to modify /etc/init.d/anacron ... NOTE: the reason anacron defers running until charging is to save battery life, and by letting it run it will reduce battery life. That said, on my netbook, which after a year is down to 5 hours life, lost about 10 minutes ... totally worth it IMO. But here we go: , , , , - mousepad /etc/init.d/anacron , , - modify this: (only partially shown) , , log_progress_msg DQdeferred while on battery powerDQ , , log_end_msg 0 , , exit 0 , , - to this: , , log_progress_msg DQrunning while on battery powerDQ , , log_end_msg 0 , , # exit 0 , , , , Thats it! Just comment out the exit line and it will continue as normal. You can choose whatever progress message you want as well; personally I have it tell me I look good today. :P Enjoy! ,