I am trying to remove all my unused kernels but it is not working. My dpkg --list | grep linux-image result is as follows:
ii linux-image-3.13.0-24-generic 3.13.0-24.46 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-extra-3.13.0-24-generic 3.13.0-24.46 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP ii linux-image-generic 22.214.171.124.28 amd64 Generic Linux kernel image
It is not showing any other kernel entries whereas there are many. ls /lib/modules gives me this result:
3.13.0-24-generic 3.17.0-rc6+ 3.18.0-rc1-00326-g3d85e2c-dirty 3.17.0-rc5+ 3.18.0-rc1+ 3.17.0-rc6 3.18.0-rc1-00314-gb0ef3ed
Currently I am running 3.18.0-rc1+ and I wants to remove all other 3.18.xxx versions but no command is working. I ran sudo apt-get purge linux-image-3.18.0-rc1-00326-g3d85e2c-dirty but it is showing following output:
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-image-3.18.0-rc1-00326-g3d85e2c-dirty E: Couldn't find any package by regex 'linux-image-3.18.0-rc1-00326-g3d85e2c-dirty'
I also tried sudo apt-get autoremove but it is showing following output:
Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 420 not upgraded.
I am confused now. Please help me.