3

I have extremely low space in /boot and wondering I could get rid if a few things. This is the output of sudo ls -al /boot:

total 216002  
drwxr-xr-x  4 root root     3072 Feb 20 12:33 .  
drwxr-xr-x 23 root root     4096 Feb 20 12:30 ..  
-rw-r--r--  1 root root  1271689 Oct 22  2015 abi-3.19.0-32-generic  
-rw-r--r--  1 root root  1239577 Apr 18  2016 abi-4.4.0-21-generic  
-rw-r--r--  1 root root  1244118 Jan  6 17:44 abi-4.4.0-59-generic  
-rw-r--r--  1 root root  1244118 Jan 18 08:59 abi-4.4.0-62-generic  
-rw-r--r--  1 root root  1245512 Feb  1 12:39 abi-4.4.0-63-generic  
-rw-r--r--  1 root root   177790 Oct 22  2015 config-3.19.0-32-generic  
-rw-r--r--  1 root root   189412 Apr 18  2016 config-4.4.0-21-generic  
-rw-r--r--  1 root root   190047 Jan  6 17:44 config-4.4.0-59-generic  
-rw-r--r--  1 root root   190047 Jan 18 08:59 config-4.4.0-62-generic  
-rw-r--r--  1 root root   190247 Feb  1 12:39 config-4.4.0-63-generic  
drwxr-xr-x  5 root root     1024 Feb  2 19:56 grub  
-rw-r--r--  1 root root 35945618 Jan 15 04:42 initrd.img-3.19.0-32-generic  
-rw-r--r--  1 root root 40519001 Jan 15 08:48 initrd.img-4.4.0-21-generic  
-rw-r--r--  1 root root 41067223 Feb  2 09:45 initrd.img-4.4.0-59-generic  
-rw-r--r--  1 root root 41069127 Feb  2 19:56 initrd.img-4.4.0-62-generic  
drwx------  2 root root    12288 Jul  6  2016 lost+found  
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin  
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf  
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin  
-rw-------  1 root root  3628149 Oct 22  2015 System.map-3.19.0-32-generic  
-rw-------  1 root root  3853719 Apr 18  2016 System.map-4.4.0-21-generic  
-rw-------  1 root root  3875594 Jan  6 17:44 System.map-4.4.0-59-generic  
-rw-------  1 root root  3875553 Jan 18 08:59 System.map-4.4.0-62-generic  
-rw-------  1 root root  3883990 Feb  1 12:39 System.map-4.4.0-63-generic  
-rw-r--r--  1 root root  6572944 Jul  4  2016 vmlinuz-3.19.0-32-generic  
-rw-------  1 root root  7013968 Apr 18  2016 vmlinuz-4.4.0-21-generic  
-rw-------  1 root root  7069136 Jan  6 17:44 vmlinuz-4.4.0-59-generic  
-rw-------  1 root root  7070992 Jan 18 08:59 vmlinuz-4.4.0-62-generic  
-rw-------  1 root root  7087088 Feb  1 12:39 vmlinuz-4.4.0-63-generic  

If I am correct I could delete everything with lower numbers before generic.

Example:

vmlinuz-4.4.0-21-generic
vmlinuz-4.4.0-59-generic
vmlinuz-4.4.0-62-generic
vmlinuz-4.4.0-63-generic

I should be able to delete:

vmlinuz-4.4.0-21-generic
vmlinuz-4.4.0-59-generic
vmlinuz-4.4.0-62-generic

Please tell me if I am able to do this to clear space without damaging my system.

6
  • Do you know which kernel your system is currently running? While it's likely to be the latest, you really want to be sure on this one. Also, which distribution are you using? Feb 24, 2017 at 22:42
  • I am running Linux mint 18 and I do not know what kernel I am running is there a way to check. @Philip Feb 24, 2017 at 22:49
  • 1
    uname -r should display your current kernel.
    – cherdt
    Feb 24, 2017 at 23:14
  • Back in Debian, I usually delete the running kernel without consequences, and as long I have a valid kernel installed to boot... Feb 25, 2017 at 1:10
  • when you delete the kernel you can also delete the initrd files and system map files. The config files are used if you wanted to build the kernels from the source trees so you can probably get rid of them as well.
    – icarus
    Feb 25, 2017 at 2:13

2 Answers 2

8

On Debian-based distributions (which Linux Mint is since Ubuntu is), sudo apt-get autoremove will remove any old kernels (and possibly other packages) that you no longer need. This is recommended rather than deleting the files manually.

2

If you are running 4.4.0-63, you can delete all the vlinuz-*, System.map-*, initrd.img-*, config-*, abi-*, except those containing the string 4.4.0-63. However, for resilience , I would keep the previous version around i.e. those files containing 4.4.0-62.

You may have to update GRUB or whatever bootloader you use afterwords.

You must log in to answer this question.

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