0

I need to free up some space in the /boot partition.

Looking in another [thread][1] I found I should use sudo dpkg --list 'linux-image*' to locate and sudo apt-get remove linux-image-VERSION to remove unused Kernel Images however no matter which one I choose they all say the last one 51 depends on it; it gives the option to force it but I am not 100 % sure about that the right way to go.

$ 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
muru
  • 197,895
  • 55
  • 485
  • 740
rapco
  • 1

2 Answers2

1

You can remove unused programs including kernel images with:
sudo apt-get autoremove

Pabi
  • 7,401
  • 3
  • 40
  • 49
0

You did not include how you are trying to remove the kernels but I guess that doesn't really change the answer to your question. Run the following commands to delete the unused kernels:

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
mchid
  • 43,546
  • 8
  • 97
  • 150