Answers:
根据这篇文章
禁用apt-daily.service:
systemctl stop apt-daily.timer
systemctl disable apt-daily.timer
systemctl disable apt-daily.service
systemctl stop apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.service
要么
systemctl disable --now apt-daily{,-upgrade}.{timer,service}
不,没有为此感到遗憾。在16.04中,这些相关选项在/etc/apt/apt.conf.d/10periodic
文件中设置
显然,最简单的更改方法是通过“软件和更新”>“更新”,如果您更改了默认设置,它将编辑该文件。
您可以根据需要手动编辑该文件,也可以使用一些命令将选项设置为false(“ 0”
编辑/etc/apt/apt.conf.d/20auto-upgrades
以从命令行禁用自动更新:
$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
打开文件后,将Update-Package-Lists指令从1切换为0,如下所示:
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "1";