ubuntu18关闭自动更新检查
- 参考:
关闭 Unattended Upgrades
关机的时候,有时提示”Unattended Upgrades in progress” ,然后很久无法关机。
再启动的时候,有提示 apt lock了:
1 2 | E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? |
-
方法一: 配置 Unattended Upgrades
1
sudo dpkg-reconfigure unattended-upgrades
-
方法二: 干脆直接卸载 Unattended Upgrades
1
sudo apt remove unattended-upgrades
-
方法三: 图形界面工具 Software Updater 中关闭
- 运行 Software Updater -> Settings… -> Updates
- Automatically check for updates : 选择 Never
不确定如下方法是否有用
方法一:
1 2 | sudo systemctl disable apt-daily.service apt-daily-upgrade.service sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer |
方法二:
cd /etc/apt/apt.conf.d/
- 找到包含
Update-Package-Lists
的文件1 2
$ find . -type f | xargs grep -iHn --color Update-Package-Lists ./10periodic:1:APT::Periodic::Update-Package-Lists "1";
- 修改这个文件,将
Update-Package-Lists "1"
改为Update-Package-Lists "0"
方法三:
1 | sudo apt remove packagekit |