This question already has an answer here:

Which of these files are safe to delete to free space in /boot? For future needs, how can I know which files are in use and which ones are obsolete?

root@ubu:/boot# ls -l
total 153003
-rw-r--r-- 1 root root  1162712 ago 13 18:45 abi-3.13.0-34-generic
-rw-r--r-- 1 root root  1163858 ago 15 04:56 abi-3.13.0-35-generic
-rw-r--r-- 1 root root  1164509 nov 13 19:30 abi-3.13.0-40-generic
-rw-r--r-- 1 root root  1164720 dic  8 21:28 abi-3.13.0-43-generic
-rw-r--r-- 1 root root   165611 ago 13 18:45 config-3.13.0-34-generic
-rw-r--r-- 1 root root   165652 ago 15 04:56 config-3.13.0-35-generic
-rw-r--r-- 1 root root   165745 nov 13 19:30 config-3.13.0-40-generic
-rw-r--r-- 1 root root   165745 dic  8 21:28 config-3.13.0-43-generic
drwxr-xr-x 5 root root     1024 dic 12 11:53 grub
-rw-r--r-- 1 root root 28321722 ago 20 08:49 initrd.img-3.13.0-34-generic
-rw-r--r-- 1 root root 28332451 nov 16 22:45 initrd.img-3.13.0-35-generic
-rw-r--r-- 1 root root 28350706 dic  2 10:47 initrd.img-3.13.0-40-generic
-rw-r--r-- 1 root root 28386822 dic 12 11:53 initrd.img-3.13.0-43-generic
drwx------ 2 root root    12288 jul 21 12:21 lost+found
-rw-r--r-- 1 root root   176500 mar 12  2014 memtest86+.bin
-rw-r--r-- 1 root root   178176 mar 12  2014 memtest86+.elf
-rw-r--r-- 1 root root   178680 mar 12  2014 memtest86+_multiboot.bin
-rw------- 1 root root  3381262 ago 13 18:45 System.map-3.13.0-34-generic
-rw------- 1 root root  3386444 ago 15 04:56 System.map-3.13.0-35-generic
-rw------- 1 root root  3387231 nov 13 19:30 System.map-3.13.0-40-generic
-rw------- 1 root root  3388760 dic  8 21:28 System.map-3.13.0-43-generic
-rw------- 1 root root  5797728 ago 13 18:45 vmlinuz-3.13.0-34-generic
-rw------- 1 root root  5806368 ago 15 04:56 vmlinuz-3.13.0-35-generic
-rw------- 1 root root  5808960 nov 13 19:30 vmlinuz-3.13.0-40-generic
-rw------- 1 root root  5814080 dic  8 21:28 vmlinuz-3.13.0-43-generic

marked as duplicate by Eric Carvalho, Elder Geek, karel, Fabby, g_p Jan 16 '15 at 7:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Question has been asked before, have a look at askubuntu.com/questions/89710/… – Minos Jan 15 '15 at 10:16
  • That gives an answer for a particular case, with a not so straight solution, I'm asking for a general and straight solution – K. Weber Jan 15 '15 at 10:20
  • What do you mean with a not so straight solution? Both that and your question are about clearing space in /boot, where the space is used by installed kernels, the "straight" solution is to remove any unused kernels. Which is explained in the answers to that question. – Minos Jan 15 '15 at 10:25
  • IT'S NOT A DUPLICATE, THIS ANSWER IS BETTER AND SHORTER, THERE'S NO MENTION FOR uname -a in the other question and that's a key to kwow which ones are safe to delete – K. Weber Mar 25 '15 at 9:21
up vote 9 down vote accepted

First you need to know which kernel you are running. You do that with

$ uname -a
Linux hostname 3.2.0-74-generic #109-Ubuntu SMP Tue Dec 9 ....

The 3.2.0-74-generic is the interesting part. If you see through the files you will notice that there are always the same 5 files with the same number. Afaik these build each version/installation of a specific kernel version. Now to delete an older version of the kernel, just delete all 5 files from the older version. To delete "3.13.0-34" just delete every file with "3.13.0-34" in it.

Update: While searching again myself i found a simpler solution here: Unable to update ubuntu applications because there is not enough space on /boot

sudo apt-get remove --purge linux-image-3.11.0-XX-generic 

Where linux-image-XXX should accordingly be filled in with the kernel version you want to delete.

Not the answer you're looking for? Browse other questions tagged or ask your own question.