Score:0

Which files can I remove from /boot

cn flag

I need about 60M more free space to upgrade from 18.04 Ubuntu version to 20.04. I see that a few file names are the same but with different number at the end, maybe some of them are older versions which are not being used?

ls -lh /boot
total 115M
-rw-r--r-- 1 root root    231K Mar 30  2020 config-5.3.0-46-generic
-rw-r--r-- 1 root root    233K Apr 16 11:44 config-5.4.0-73-generic
-rw-r--r-- 1 root root    233K May 11 10:56 config-5.4.0-74-generic
drwxrwx--- 4 root plugdev  512 Dec 31  1969 efi
drwxr-xr-x 5 root root    1.0K Jun 13 12:00 grub
-rw-r--r-- 1 root root     17M Apr  8 16:23 initrd.img-5.3.0-46-generic
-rw-r--r-- 1 root root     29M May 21 19:27 initrd.img-5.4.0-73-generic
-rw-r--r-- 1 root root     30M Jun 13 12:03 initrd.img-5.4.0-74-generic
drwx------ 2 root root     12K Jan 31  2020 lost+found
-rw-r--r-- 1 root root    179K Jan 28  2016 memtest86+.bin
-rw-r--r-- 1 root root    181K Jan 28  2016 memtest86+.elf
-rw-r--r-- 1 root root    181K Jan 28  2016 memtest86+_multiboot.bin
-rw------- 1 root root    4.3M Mar 30  2020 System.map-5.3.0-46-generic
-rw------- 1 root root    4.4M Apr 16 11:44 System.map-5.4.0-73-generic
-rw------- 1 root root    4.4M May 11 10:56 System.map-5.4.0-74-generic
-rw------- 1 root root    8.8M Mar 30  2020 vmlinuz-5.3.0-46-generic
-rw------- 1 root root    9.1M Apr 16 11:44 vmlinuz-5.4.0-73-generic
-rw------- 1 root root    9.1M May 11 10:58 vmlinuz-5.4.0-74-generic

Sorry if this is hard to read, I wrote it with help of translator.

guiverc avatar
cn flag
Ubuntu 18.04 is a different product to Ubuntu Core 20. Ubuntu has both *year.month* or *deb* based products, and *snap* only products which use the format *year* only. As they are different products, you are not intended to upgrade from one to the other, a *year.month* format product such as 18.04 is QA-tested to upgrade to the next release (18.10) or the next LTS (20.04) and not to a different product such as Ubuntu Core 20.
N.N. avatar
cn flag
I was referring to version 20.04. I already updated it so there is no confusion. Thanks for the clarification.
Score:2
zw flag

Do no remove these files manually. Use special applications instead - start with

sudo apt-get autoremove

and then use purge-old-kernels script - install and run it with

sudo apt-get install byobu
sudo purge-old-kernels

Ideally you need only one latest 5.4.0-74 kernel, so for removal of 5.3.0-46 and 5.4.0-73 you can run the commands below:

sudo apt-get purge --autoremove linux-headers-5.3.0-46 linux-image-5.3.0-46 linux-modules-5.3.0-46 linux-modules-extra-5.3.0-46

sudo apt-get purge --autoremove linux-headers-5.4.0-73 linux-image-5.4.0-73 linux-modules-5.4.0-73 linux-modules-extra-5.4.0-73
N.N. avatar
cn flag
First and second scripts made no changes on `/boot`. The last one worked, releasing about 50MB. I'll try to upgrade again and see if it is enough.
N.N. avatar
cn flag
It worked perfect, thanks!
N.N. avatar
cn flag
Byobu seems like a great acquisition too. LOL
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.