参考: https://lala.im/7717.html
apt -y update
apt -y install unattended-upgrades
systemctl enable --now unattended-upgrades
systemctl status unattended-upgrades.service
然后确认一下配置文件如下 vi /etc/apt/apt.conf.d/50unattended-upgrades
![](https://cdn.1024.ee/wp-content/uploads/2021/01/mini_-2021-01-31-at-09.59.03-1024x585.png)
生成自动 dpkg-reconfigure -plow unattended-upgrades 确保有
![](https://cdn.1024.ee/wp-content/uploads/2021/01/mini_-2021-01-31-at-09.58.09.png)
测试下
unattended-upgrade