20 upgrade package-management apt cron unattended-upgrades
假设我最近通过以下方式安装了无人值守升级:
sudo apt-get install unattended-upgrades -y
sudo dpkg-reconfigure --priority=low unattended-upgrades -y
Run Code Online (Sandbox Code Playgroud)
无人值守升级是否还包括apt-get autoremove
?
或者我应该在无人值守升级层上添加每周一次的 cronjob 以确保删除的包的依赖项也被删除,通过crontab -e
然后:
0 0 * * 0 apt-get autoremove -y
Run Code Online (Sandbox Code Playgroud)
注意:如果需要,请随意提及除 autoremove 之外的类似 apt 概念。
Mik*_* T. 25
是否unattended-upgrades
执行清理(自动删除)由 中的Unattended-Upgrade::Remove-Unused-Dependencies
设置控制/etc/apt/apt.conf.d/50unattended-upgrades
。将其设置如下以启用清理 - 您应该能够删除显式 autoremove cron-job:
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Run Code Online (Sandbox Code Playgroud)
小智 6
除了 Mikhail 的建议,自动删除未使用的内核包也很有用。这将防止/boot/
分区在某些 Ubuntu 系统上被填满。完整的 /boot 分区可能会导致问题。
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6128 次 |
最近记录: |