3

Currently there is not enough space on by /boot partition/folder and the sofware update can not be performed.

Question: how should I correctly free-up some space in that directory?

Here is the listing:

root@mindaugas-ubuntu-14:/boot# ls -la
total 156607
drwxr-xr-x  4 root root     3072 Kov 12 09:37 .
drwxr-xr-x 24 root root     4096 Kov 23 23:36 ..
-rw-r--r--  1 root root  1163858 Rgs  4  2014 abi-3.13.0-36-generic
-rw-r--r--  1 root root  1164720 Grd 16 03:17 abi-3.13.0-44-generic
-rw-r--r--  1 root root  1164967 Sau 13 22:12 abi-3.13.0-45-generic
-rw-r--r--  1 root root  1164852 Kov 10 22:43 abi-3.13.0-46-generic
-rw-r--r--  1 root root   165671 Rgs  4  2014 config-3.13.0-36-generic
-rw-r--r--  1 root root   165748 Grd 16 03:17 config-3.13.0-44-generic
-rw-r--r--  1 root root   165748 Sau 13 22:12 config-3.13.0-45-generic
-rw-r--r--  1 root root   165748 Kov 10 22:43 config-3.13.0-46-generic
drwxr-xr-x  5 root root     1024 Kov 12 09:37 grub
-rw-r--r--  1 root root 29225220 Rgs 25  2014 initrd.img-3.13.0-36-generic
-rw-r--r--  1 root root 29264463 Sau 24 20:22 initrd.img-3.13.0-44-generic
-rw-r--r--  1 root root 29267419 Vas 23 20:30 initrd.img-3.13.0-45-generic
-rw-r--r--  1 root root 29268175 Kov 12 09:37 initrd.img-3.13.0-46-generic
drwx------  2 root root    12288 Rgs 14  2014 lost+found
-rw-r--r--  1 root root   176500 Kov 12  2014 memtest86+.bin
-rw-r--r--  1 root root   178176 Kov 12  2014 memtest86+.elf
-rw-r--r--  1 root root   178680 Kov 12  2014 memtest86+_multiboot.bin
-rw-------  1 root root  3386479 Rgs  4  2014 System.map-3.13.0-36-generic
-rw-------  1 root root  3388834 Grd 16 03:17 System.map-3.13.0-44-generic
-rw-------  1 root root  3389258 Sau 13 22:12 System.map-3.13.0-45-generic
-rw-------  1 root root  3389458 Kov 10 22:43 System.map-3.13.0-46-generic
-rw-------  1 root root  5806848 Rgs  4  2014 vmlinuz-3.13.0-36-generic
-rw-------  1 root root  5814496 Grd 16 03:17 vmlinuz-3.13.0-44-generic
-rw-------  1 root root  5814112 Sau 13 22:12 vmlinuz-3.13.0-45-generic
-rw-------  1 root root  5814592 Kov 10 22:43 vmlinuz-3.13.0-46-generic

There was a mention of it here: I deleted files from my Linux box's /boot directory and now it won't boot

$ sudo apt-get remove linux-image-2.6.31-21-generic

but will it delete all the files?

1 Answer 1

7

I'm assuming you are using a Debian/Ubuntu based system as they do not automatically remove older kernels, whereas Fedora and family do.

List all your installed kernels with:

dpkg -l | grep linux-image

You'll get a list of all packages. Decide which ones you want to keep and remove the others:

sudo apt-get autoremove linux-image-a.b.c linux-image-x.y.z 

where a.b.c and x.y.z should be replaced with the version(s) you want removed.

Make sure you don't remove your current kernel :-) which you can find with:

uname -r

It might be wise, especially if you've just upgraded a kernel, to keep a previous version installed too - just in case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .