突然SystemTap、crash、eBPF都不太正常,无意中发现"uname -r"从5.15.0-48-generic升到5.15.0-50-generic,坑我。很多研究性质的VM并不想自动升级,包括安全补丁,应该禁用自动升级。
参看
Disable Automatic Updates on Ubuntu 22.04 Jammy Jellyfish Linux - Korbin Brown [2022-04-21]
https://linuxconfig.org/disable-automatic-updates-on-ubuntu-22-04-jammy-jellyfish-linux
$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
这是缺省内容,改成
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
上面是CLI方式,也可以GUI禁用。
Software & Updates
Updates
Automatically check for updates
Daily (Default)
Never
When there are security updates
Download and install automatically (Default)
Display immediately
When there are other updates
Display weekly (Default)
Display every two weeks
Notify me of a new Ubuntu version
For long-term support versions (Default)
Never