Say I recently installed unattended-upgrades via:
sudo apt-get install unattended-upgrades -y
sudo dpkg-reconfigure --priority=low unattended-upgrades -y
Does unattended-upgrades also include apt-get autoremove?
Or should I add a weekly cronjob atop the unattended-upgrades layer to make sure dependencies of deleted packages are removed as well, via crontab -e and then:
0 0 * * 0 apt-get autoremove -y
Note: Feel free to mention similar apt concepts besides autoremove if these are needed.
unattended-upgradeshave the optionRemove-New-Unused-Dependenciesenabled automatically, which basically performsautoremove, but only for packages newly made unused after an upgrade run. (TheRemove-Unused-Kernel-Packagesoption mentioned below also appears to be enabled by default now.) – Dustin Martin Oct 11 '21 at 21:16