我安装了错误版本的内核。我想删除它,因为它在 grub 高级选项中也可见。
答案1
让我们通过一个例子来解释一下...使用您想要保留的内核启动,在本例中为 kernel 4.2.0-35
。要检查当前安装了哪些内核版本,请打开终端并执行:
dpkg --get-selections | grep linux
此示例中的输出显示内核4.2.0-34
和4.2.0-35
当前已安装。
linux-firmware install
linux-generic install
linux-headers-4.2.0-34 install
linux-headers-4.2.0-35 install
linux-headers-4.2.0-34-generic install
linux-headers-4.2.0-35-generic install
linux-headers-generic install
linux-image-4.2.0-34-generic install
linux-image-4.2.0-35-generic install
linux-image-extra-4.2.0-34-generic install
linux-image-extra-4.2.0-35-generic install
linux-image-generic install
linux-libc-dev:amd64 install
linux-signed-generic install
linux-signed-image-4.2.0-34-generic install
linux-signed-image-4.2.0-35-generic install
linux-signed-image-generic install
假设kernel 4.2.0-34
要删除较旧的版本 - 执行以下命令:
sudo apt-get purge linux-headers-4.2.0-34 linux-headers-4.2.0-34-generic linux-image-4.2.0-34-generic linux-image-extra-4.2.0-34-generic linux-signed-image-4.2.0-34-generic