更新 2024/05/08 - 根据评论(谢谢!):
我从来没有触及过 /etc/apt/apt.conf.d/50unattended-upgrades 的内部结构。
沒有看到 update-at-shutdown
。
以下是文件内容不是注释掉:
Unattended-Upgrade::Allowed-Origins { *blah blah* }
Unattended-Upgrade::Package-Blacklist { *blah blah* }
Unattended-Upgrade::DevRelease "auto";
就这些了。剩余内容是评论。
一直在等待关机的下一次更新...:-/
更新 2024/05/07 - 根据回复和评论:“自行更新”是指:
至于“软件和更新”建议,我已经拥有了大部分设置,并且无法进行任何更改。任何选择都会立即恢复到此处显示的内容:
更有趣的是,我定期(每周几次?)这样做:
sudo apt update && sudo apt upgrade -y
每次我启动时,登录时都会收到通知,有时关机时,它也会自行开始更新。我想完全(手动)控制何时以及如何更新系统。
这是我所尝试的。
/etc/apt/apt.conf.d
$ cat 10periodic
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
和:
/etc/apt/apt.conf.d
$ cat 20auto-upgrades
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
还:
$ systemctl status unattended-upgrades.service
○ unattended-upgrades.service
Loaded: masked (Reason: Unit unattended-upgrades.service is masked.)
Active: inactive (dead)