0

I updated the linux kernel from 3.5 to 3.16 by downloading tar.xz file from linuxkernel.org and compiled, and subsequently installed successfully on my ubuntu machine(meaning I am able to see the boot options when I start the pc and can log into either 3.5 or 3.16 version of linux kernel) but now I want to remove the newer version. steps I followed

  1. logged into older version 3.5
  2. ran dpkg --list | grep linux-image but there is no mention of 3.16

    root@h2o-Vostro-1015:~# dpkg --list | grep linux-image
    ii  linux-image-3.5.0-17-generic              3.5.0-17.28                               i386         Linux kernel image for version 3.5.0 on 32 bit x86 SMP
    ii  linux-image-extra-3.5.0-17-generic        3.5.0-17.28                               i386         Linux kernel image for version 3.5.0 on 32 bit x86 SMP
    ii  linux-image-generic                       3.5.0.17.19                               i386         Generic Linux kernel image
    

which indicated that I have only 3.5 version installed,but I can boot into 3.16 version and also

  • I checked the /boot directory, there I can see the initrd.img-3.16.0-rc4, which proves that the 3.16 version is still present.

had above steps worked I would have tried either removal through synaptic or

sudo apt-get remove --purge 3.16.0*

command via terminal.

kindly advise how can I remove the newer version.

2
  • askubuntu.com/questions/2793/… – Elder Geek Jul 12 '14 at 16:50
  • the solution in given link to question is for removing older versions of linux kernel, whereas I am intersted in removing the newer version. in addition to that I tried the ones given in this answer too but to no avail – Himanshu Sourav Jul 12 '14 at 17:29
1

Since you installed the kernel manually, posting a link to what instructions you followed would be helpful.

To delete manually, you can run ls -l /boot . Typically the files would be:

  1. abi-*
  2. initrd.img-*
  3. config-*
  4. System.map-*
  5. vmlinuz-*

Delete these files (corresponding to 3.16) and update grub.

0
0

All your kernels should be found in /boot. As super user(root), delete the ones you don't need and update grub.

2
  • are you suggesting manual removal of files & directory..? and if yes which ones..? – Himanshu Sourav Jul 12 '14 at 17:31
  • Yes. "Which ones?" The ones you specified in your question. – Elder Geek Jul 12 '14 at 19:43
0

NOTE: Installing kernels (or other types of software) OUTSIDE of the package manager causes your work not to show up in apt-get (dpkg) and may have some ramifications to system stability and maintainability.

It is easy to remove a specific kernel however, simply go to the /boot file, and remove the files with the matching version number. Then you must update the grub menu to remove that entry (if it even exists) in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.