要禁止Ubuntu系统的软件更新,可以采取以下方法:
sudo nano /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
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";
保存并关闭文件(按Ctrl+X,然后按Y确认)。
禁用Unattended-Upgrades服务:输入以下命令以停止和禁用自动更新服务:
sudo systemctl stop unattended-upgrades
sudo systemctl disable unattended-upgrades
这样就禁止了Ubuntu系统的软件更新。请注意,禁用软件更新可能会导致系统安全性和稳定性的问题,因此在禁用之前请慎重考虑。