編碼的世界 / 優質文選 / 女人

禁止ubuntu更新內核


2021年7月05日
-   

查看已安裝內核
dpkg get-selections |grep linux-image

查看正在使用的內核
uname -a

刪除舊內核
sudo apt-get remove linux-image-x.xx.x-xx-generic
sudo apt-get remove linux-image-extra-x.xx.x-xx-generic

或用這個命令移除
sudo dpkg purge linux-image-x.x.x-xx-generic

禁止更新內核,需時間來驗證
sudo apt-mark hold linux-image-x.xx.x-xx-generic
sudo apt-mark hold linux-image-extra-x.xx.x-xx-generic

如果需要恢複原來的設定的話即允許更新內核,執行如下命令即可:
sudo apt-mark unhold linux-image-x.xx.x-xx-generic
sudo apt-mark unhold linux-image-extra-x.xx.x-xx-generic

ubuntu14.04 修改配置文件 禁止系統自動更新
1修改配置文件 修改配置文件/etc/apt/apt.conf.d/10periodic 然後0是關閉,將所有值改為0 vim etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists “0”; APT::Periodic::Download-Upgradeable-Packages “0”; APT::Periodic::AutocleanInterval “0”;

熱門文章