從 grub 中刪除內核

從 grub 中刪除內核

我的 grub 有以下版本,我想刪除它們。

  • Ubuntu,Linux 4.1.0-rc5-next-20150529
  • Ubuntu,Linux 4.1.0-rc5-next-20150529.old
  • Ubuntu,Linux 4.1.0-rc4-next-20150525
  • Ubuntu,Linux 4.0.0-rc6-next-20150402+
  • Ubuntu,Linux 4.0.0-rc6-next-20150402+.old

我嘗試了以下方法來刪除:

使用 Synaptic 工具,我輸入了以下命令:

uname -r    
dpkg --list | grep linux-image     
sudo apt-get purge linux-image-x.x.x.x-xyz  
sudo update-grub2

這兩種方法都無法刪除內核版本。

答案1

如果您的核心映像和標頭是從 deb 軟體包安裝的,而不是從儲存庫安裝的,您可以透過以下方式刪除它們

sudo dpkg -r linux-image-x.x.x.x-xyz linux-headers-x.x.x.x-xyz

但使用突觸就容易得多。你會在 GUI 中看到你在做什麼。

相關內容