5

I'm wondering who starts unattended-upgrades in my debian-jessie:

  1. my man page

DESCRIPTION This program can download and install security upgrades automatically and unattended, taking care to only install packages from the config‐ ured APT source, and checking for dpkg prompts about configuration file changes. All output is logged to /var/log/unattended-upgrades.log. This script is the backend for the APT::Periodic::Unattended-Upgrade option and designed to be run from cron (e.g. via /etc/cron.daily/apt).

  1. But my crontab doesn't show anything by crontab command:

    @stefano:/etc/cron.daily$ crontab -l
    no crontab for stefano
    # crontab -l
    no crontab for root
    
  2. But my unattended-upgrade work fine!(my unattended-upgrades log file) :

    2017-02-05 12:42:42,835 INFO Initial blacklisted packages: 
    2017-02-05 12:42:42,866 INFO Initial whitelisted packages: 
    2017-02-05 12:42:42,868 INFO Starting unattended upgrades script
    2017-02-05 12:42:42,870 INFO Allowed origins are: ['o=Debian,n=jessie', 'o=Debian,n=jessie-updates', 'o=Debian,n=jessie-backports', 'origin=Debian,codename=jessie,label=Debian-Security']
    2017-02-05 12:43:15,848 INFO No packages found that can be upgraded unattended

Where do I have to check/modify if I want to change my schedule?

2

Where do I have to check/modify if I want to change my schedule?

The unattended-upgrades is configured to be applied automatically .

To verify it check the /etc/apt/apt.conf.d/20auto-upgrades file , you will get :

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

to modify it you should run the following command:

dpkg-reconfigure -plow unattended-upgrades 

sample output:

 Applying updates on a frequent basis is an important part of keeping 
 systems secure. By default, updates need to be applied manually using
 package management tools.

 Alternatively, you can choose to have this system automatically download 
 and install security updates.                                                                   

     Automatically download and install stable updates?

Choose NO to stop the auto update

Verify the /etc/apt/apt.conf.d/20auto-upgrades again, you should get :

APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";

Edit

To run the unattended-upgrades weekly edit your /etc/apt/apt.conf.d/20auto-upgrades as follows :

APT::Periodic::Update-Package-Lists "7";
APT::Periodic::Unattended-Upgrade "1";

A detailed example can be found on Debian-Wiki : automatic call via /etc/apt/apt.conf.d/02periodic

APT::Periodic::Update-Package-Lists

This option allows you to specify the frequency (in days) at which the package lists are refreshed. apticron users can do without this variable, since apticron already does this task.

  • If I'd like to set apt-updating weekly and not daily, do I have to change or delete 20auto-upgrades file then type 02periodic file then run/configure something else ? debian web page alternative isn't so much clear about that. – user3371854 Feb 5 '17 at 16:30
  • OK, but can 02periodic and and 20auto-upgrades files live together? or do I have to delete one? debian web page isn't so much clear about this point. – user3371854 Feb 5 '17 at 18:10
  • you don't need the 02periodic file because it is an alternative to 20auto-upgrades , you can delete it Or keep it with the same contents of 20auto-upgrades – GAD3R Feb 5 '17 at 19:21
2

/etc/crontab has a run-parts /etc/cron.daily line which references a folder that contains a /etc/cron.daily/apt-compat file which executes exec /usr/lib/apt/apt.systemd.daily

0

anacron starts unattended-upgrades and other System-cron-jobs.

cat /etc/anacrontab 
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1   5   cron.daily  run-parts --report /etc/cron.daily
7   10  cron.weekly run-parts --report /etc/cron.weekly
@monthly    15  cron.monthly    run-parts --report /etc/cron.monthly
  • But there is no unattended-upgrades reference inside that /etc/anacrontab . How could you tell it runs unattended-upgrades? – Sopalajo de Arrierez Oct 12 '17 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.