3

After the usual "your /boot is full" message, I tried to clean old kernels with byobu

sudo purge-old-kernels 
No kernels are eligible for removal

However when I run ls /boot, I get this

abi-4.4.0-78-generic                  initrd.img-4.4.0-51-generic.old-dkms  initrd.img-4.4.0-70-generic.old-dkms  memtest86+.bin
config-4.4.0-78-generic               initrd.img-4.4.0-53-generic.old-dkms  initrd.img-4.4.0-71-generic.old-dkms  memtest86+.elf
efi                                   initrd.img-4.4.0-57-generic.old-dkms  initrd.img-4.4.0-72-generic.old-dkms  memtest86+_multiboot.bin
grub                                  initrd.img-4.4.0-59-generic.old-dkms  initrd.img-4.4.0-75-generic           System.map-4.4.0-78-generic
initrd.img-4.4.0-38-generic.old-dkms  initrd.img-4.4.0-62-generic.old-dkms  initrd.img-4.4.0-75-generic.old-dkms  vmlinuz-4.4.0-78-generic
initrd.img-4.4.0-42-generic.old-dkms  initrd.img-4.4.0-63-generic.old-dkms  initrd.img-4.4.0-77-generic.old-dkms  vmlinuz-4.4.0-78-generic.efi.signed
initrd.img-4.4.0-43-generic.old-dkms  initrd.img-4.4.0-64-generic.old-dkms  initrd.img-4.4.0-78-generic
initrd.img-4.4.0-45-generic.old-dkms  initrd.img-4.4.0-66-generic.old-dkms  initrd.img-4.4.0-79-generic.old-dkms
initrd.img-4.4.0-47-generic.old-dkms  initrd.img-4.4.0-67-generic.old-dkms  lost+found

When I run dpkg --list | egrep -i 'linux-image|linux-headers' , the output includes

rc  linux-image-extra-4.4.0-xx-generic          4.4.0-xx                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

What the rc in front means? Why are these residual images there and how do I fix it?
 

EDIT 1: I removed all residual packages and now dpkg --list | egrep -i 'linux-image|linux-headers' looks normal

ii  linux-headers-4.4.0-78                      4.4.0-78.99                                   all          Header files related to Linux kernel version 4.4.0
ii  linux-headers-4.4.0-78-generic              4.4.0-78.99                                   amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-78-generic                4.4.0-78.99                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-78-generic          4.4.0-78.99                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

apt purge gives 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

The grub is still full of initrd.img.

3
  • @daisy I'm not sure I understand how that answer can help
    – popi
    Jun 14, 2017 at 10:35
  • I'd thought you're trying to remove old kernel. What are you exactly trying to do?
    – d a i s y
    Jun 14, 2017 at 10:37
  • I'm trying to understand why the /boot is full of initrd.img files, why there were so many config files left, and how to prevent this situation; do you believe I should rephrase the question? I think I added enough information.
    – popi
    Jun 14, 2017 at 10:55

1 Answer 1

2

For the meaning of rc, check the header of the dpkg --list output.

$ dpkg --list | head -n3
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)

The first letter is desired, r here means Remove. The second letter is status, c here means Conf-files.

In other words, the package itself is removed but its configuration is kept. You can run apt purge <package> to remove the configurations too. The configuration files are mostly small and they are kept for easy re-installation.

The initrd.img-*.old-dkms files must be removed manually. See the answers

for additional information.

1
  • Thanks, I'll update my question. I ran sudo apt-get remove --purge $(sudo dpkg -l | grep "^rc" | awk '{print $2}' | tr '\n' ' ') and got rid of a lot of stuff. Why are the packages there in the first place though?
    – popi
    Jun 14, 2017 at 10:23

You must log in to answer this question.

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