Hey there!

Thank you in advance to anyone who reads through what I have to say here. I've tried to include as much detail as possible in my post as I'm new to these forums.

I wrote a script on my Debian 12 Bookworm box (a test system at home) and wanted to apply similar changes to my Kali boxes. My current version of Kali on both machines is 2022.4. Below are the steps I performed on my Debian box to get unattended-upgrades installed/configured. (Please note that I closely followed this article for the steps below: https://unix.stackexchange.com/quest...very-few-hours)

  • Install unattended-upgrades
    Code:
    sudo apt update && sudo apt -y install unattended-upgrades
  • Commented out all lines of /etc/apt/apt.conf.d/50unattended-upgrades (with sed)
  • Appended the following lines to the bottom of /etc/apt/apt.conf.d/50unattended-upgrades

Code:
Unattended-Upgrade::Origins-Pattern {
    "origin=Debian,codename=\${distro_codename}-updates";
    "origin=Debian,codename=\${distro_codename},label=Debian";
    "origin=Debian,codename=\${distro_codename},label=Debian-Security";
    "origin=Debian,codename=\${distro_codename}-security,label=Debian-Security";
};
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-New-Unused-Dependencies "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::OnlyOnACPower "true";
  • Created an apt-daily.timer override file at /etc/systemd/system/apt-daily.timer/override.conf with the following contents (to allow APT updates at 2 AM daily):

Code:
[Timer]
OnCalendar=
OnCalendar=*-*-* 2:00
RandomizedDelaySec=0s

  • Created an apt-daily.timer override file at /etc/systemd/system/apt-daily-upgrade.timer/override.conf with the following contents (to allow APT upgrades at 2:10 AM daily):

Code:
[Unit]
Description=Daily apt download activities
    
[Timer]
OnCalendar=*-*-* 2:10
RandomizedDelaySec=0s
Persistent=true
   
[Install]
WantedBy=timers.target
  • Commented out all lines of /etc/apt/apt.conf.d/20auto-upgrades (with sed). (I'm assuming the "//" characters are still the right ones to comment lines out for this file. Couldn't find opposing info online)
  • Appended the following lines to /etc/apt/apt.conf.d/20auto-upgrades. (Note, "always" was added in a recent update to APT by Paul Wise. Kali's current version of APT is higher than 2.4.1)

Code:
APT::Periodic::Update-Package-Lists "always";
APT::Periodic::Unattended-Upgrade "always";
  • Ran:
    Code:
    sudo systemctl daemon-reload
  • Ran:
    Code:
    sudo systemctl restart apt-daily.timer
  • Ran:
    Code:
    sudo systemctl restart apt-daily-upgrade.timer
  • Ran:
    Code:
    sudo systemctl restart unattended-upgrades.service


After following these steps on my Debian 12 box, I can see the system gets updated each day. I verify this by running 2 commands:
  • Code:
    systemctl list-timers --all apt-daily.timer
  • Code:
    cat /var/log/dpkg.log


My Debian 12 box has been running well for the past week and the behavior is as expected. When I followed these steps on Kali 2022.4, I see the correct past and upcoming update cycles with
Code:
systemctl list-timers --all apt-daily.timer
. After watching for a few days, I checked the /var/log/dpkg.log file and see nothing has changed since I last manually ran this command around a week ago.
Code:
sudo apt update && sudo apt -y upgrade
I don't know if I'm just missing something, but I wouldn't turn down any ideas/suggestions. Thank you in advance for your help!