要禁止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系統的軟件更新。請注意,禁用軟件更新可能會導致系統安全性和穩定性的問題,因此在禁用之前請慎重考慮。