0

I have run the following command to remove old kernels:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

and only the current kernel is now installed, which I have confirmed in synaptic and by checking my boot partition. However, when I run:

dpkg --list | grep linux-image

I get the following response:

rc  linux-image-3.13.0-30-generic                         3.13.0-30.55                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-32-generic                         3.13.0-32.57                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-34-generic                         3.13.0-34.60                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-30-generic                   3.13.0-30.55                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-32-generic                   3.13.0-32.57                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-34-generic                   3.13.0-34.60                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-generic                                   3.13.0.34.40                                        amd64        Generic Linux kernel image

Probably not a problem, but just wondering why versions -30 and -32 are reported as present?

Zanna
  • 69,223
  • 56
  • 216
  • 327
Tony Martin
  • 477
  • 1
  • 5
  • 16
  • 2
    See [What do the various dpkg flags like 'ii' 'rc' mean?](http://askubuntu.com/questions/18804/what-do-the-various-dpkg-flags-like-ii-rc-mean) – steeldriver Aug 20 '14 at 02:45
  • I wonder why purge does not remove config files. -33 seems to have been fully purged. – Tony Martin Aug 20 '14 at 21:37
  • Have you rebooted since running the purge command? I think sometimes the config files don't get cleaned up until reboot – steeldriver Aug 20 '14 at 21:54
  • A few times, but still lingering. It occurs to me that I installed network card driver modules for the first two kernels I ran. Haven't needed them since the third iteration. I wonder if that's the configuration that remains... – Tony Martin Aug 21 '14 at 03:59

1 Answers1

2

The answer is indeed in the first two letters of the line. The first column is a desired state and the second column is a current state. Relevant to this list is:

i = installed
r = remove(d)
c = config files

Thanks to steeldriver for directing my attention.

Zanna
  • 69,223
  • 56
  • 216
  • 327
Tony Martin
  • 477
  • 1
  • 5
  • 16