查看已安装内核
dpkg --get-selections |grep linux-image
查看正在使用的内核
uname -a
删除旧内核
sudo apt-get remove linux-image-4.10.0-28-generic
sudo apt-get remove linux-image-extra-4.10.0-28-generic
或用这个命令移除
sudo dpkg --purge linux-image-4.4.0-21-generic
禁止更新内核,需时间来验证
sudo apt-mark hold linux-image-4.13.0-31-generic
sudo apt-mark hold linux-image-extra-4.13.0-31-generic
修改配置文件
修改/etc/apt/apt.conf.d/10periodic将所有值改为0
vim etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists “0”;
APT::Periodic::Download-Upgradeable-Packages “0”;
APT::Periodic::AutocleanInterval “0”;