无人值守升级还包括apt-get autoremove吗?


17

假设我最近通过以下方式安装了无人参与的升级:

sudo apt-get install unattended-upgrades -y
sudo dpkg-reconfigure --priority=low unattended-upgrades -y

无人值守升级还包括apt-get autoremove吗?

还是我应该在无人值守升级层上每周添加一次cronjob,以确保通过crontab -e,然后再删除已删除软件包的依赖项:

0 0 * * 0 apt-get autoremove -y

注意:如果需要,除了autoremove之外,还可以随意提及类似的概念。

Answers:


23

是否unattended-upgrades执行清除(自动删除)由中的Unattended-Upgrade::Remove-Unused-Dependencies设置控制/etc/apt/apt.conf.d/50unattended-upgrades。对其进行如下设置以启用清理-并且您应该能够删除显式的autoremove cron-job:

Unattended-Upgrade::Remove-Unused-Dependencies "true";

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.