删除内核映像

删除内核映像

我需要释放/boot分区中的一些空间。

在另一个[线程][1]中查看,我发现我应该用它sudo dpkg --list 'linux-image*'来定位并sudo apt-get remove linux-image-VERSION删除未使用的内核映像,但是无论我选择哪一个,它们都说最后一个 51 取决于它;它提供了强制执行的选项,但我不能 100% 确定那是正确的方法。

$ uname -r
3.13.0-49-generic

$ sudo dpkg --list 'linux-image*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                     Version           Architecture      Description
+++-========================-=================-=================-=====================================================

un  linux-image              <none>            <none>            (no description available)
un  linux-image-3.0          <none>            <none>            (no description available)    
ii  linux-image-3.13.0-32-ge 3.13.0-32.57      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-40-ge 3.13.0-40.69      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-43-ge 3.13.0-43.72      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-44-ge 3.13.0-44.73      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-45-ge 3.13.0-45.74      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-46-ge 3.13.0-46.79      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-48-ge 3.13.0-48.80      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S    
ii  linux-image-3.13.0-49-ge 3.13.0-49.81      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S
in  linux-image-3.13.0-51-ge <none>            i386              (no description available)    
ii  linux-image-extra-3.13.0 3.13.0-32.57      i386              Linux kernel extra modules for version 3.13.0 on 32 b    
ii  linux-image-extra-3.13.0 3.13.0-40.69      i386              Linux kernel extra modules for version 3.13.0 on 32 b
ii  linux-image-extra-3.13.0 3.13.0-43.72      i386              Linux kernel extra modules for version 3.13.0 on 32 b
ii  linux-image-extra-3.13.0 3.13.0-44.73      i386              Linux kernel extra modules for version 3.13.0 on 32 b
ii  linux-image-extra-3.13.0 3.13.0-45.74      i386              Linux kernel extra modules for version 3.13.0 on 32 b    
ii  linux-image-extra-3.13.0 3.13.0-46.79      i386              Linux kernel extra modules for version 3.13.0 on 32 b    
ii  linux-image-extra-3.13.0 3.13.0-48.80      i386              Linux kernel extra modules for version 3.13.0 on 32 b    
iF  linux-image-extra-3.13.0 3.13.0-49.83      i386              Linux kernel extra modules for version 3.13.0 on 32 b    
iU  linux-image-extra-3.13.0 3.13.0-51.84      i386              Linux kernel extra modules for version 3.13.0 on 32 b    
iU  linux-image-generic      3.13.0.51.58      i386              Generic Linux kernel image

答案1

您可以使用以下命令删除未使用的程序(包括内核映像):
sudo apt-get autoremove

答案2

您没有说明如何尝试删除内核,但我想这并没有真正改变您问题的答案。运行以下命令删除未使用的内核:

sudo apt-get update
sudo apt-get install linux-image-generic linux-image-extra
sudo apt-get purge linux-image-3.13.0-3* linux-image-3.13.0-4* linux-image-extra-3.13.0=3.13.0-32.57 linux-image-extra-3.13.0=3.13.0-40.69 linux-image-extra-3.13.0=3.13.0-43.72 linux-image-extra-3.13.0=3.13.0-44.73 linux-image-extra-3.13.0=3.13.0-45.74 linux-image-extra-3.13.0=3.13.0-46.79 linux-image-extra-3.13.0=3.13.0-48.80 linux-image-extra-3.13.0=3.13.0-49.83

相关内容