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-upgrades
have the optionRemove-New-Unused-Dependencies
enabled automatically, which basically performsautoremove
, but only for packages newly made unused after an upgrade run. (TheRemove-Unused-Kernel-Packages
option mentioned below also appears to be enabled by default now.) – Dustin Martin Oct 11 '21 at 21:16