Take the 2-minute tour ×

Is there a way to remove kernel 3.1 from Oneiric?

I downloaded and upgraded to 3.1 with these instructions:

Open the terminal and run these two commands for both 32-bit and 64-bit versions of Ubuntu 11.10/11.04:

wget http://kernel.ubuntu.com/~kernel-ppa...241006_all.deb
sudo dpkg -i linux-headers-3.1.0-030100_3.1.0-030100.201110241006_all.deb

Ubuntu (64-bit)

For Ubuntu 11.10/11.04 (64-bit), issue these commands:

wget http://kernel.ubuntu.com/~kernel-ppa...1006_amd64.deb
sudo dpkg -i linux-headers-3.1.0-030100-generic_3.1.0-030100.201110241006_amd64.deb
sudo dpkg -i linux-image-3.1.0-030100-generic_3.1.0-030100.201110241006_amd64.deb

Everything went well. I was able to reboot quickly, but Firefox and Chrome constantly crash with Kernel 3.1. I am using Gnome 3.2 and saw improvement with provided by ppa. Any help with 3.1 or just removing it would be helpful. Thanks to all that reply.

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

It is advisable, though not strictly necessary, to reboot and select an older kernel first. You can remove a kernel "under" the system that is running it--it will continue to stick around in memory and function OK. But just in case some problem has developed preventing your older kernels from working, you should try booting to one of them first. (Also, some installation processes might assume that the running kernel is actually installed.)

To use an older kernel, reboot and hold down Shift while your computer is starting up. You should see different options for booting, like a recovery mode and an option to check your memory/RAM. If you see any options for a kernel that is not version 3.1, select the latest such kernel (don't select "recovery mode"). That is, select the 3.0-series kernel with the highest version number, but do not select a 3.1-series kernel. If you don't see any such option, then select the option to view older kernels, and select it there.

In the unlikely event that you attempt to boot from an older kernel but cannot, you should not proceed with the uninstallation, as that might be the only kernel you have (if no others are listed) or the only kernel that is properly functioning. (In that case, you should post a comment to this question detailing what happened, and I'll add information about how to solve this problem to my question...or request more information if necessary. However, given the information you have provided, this situation is extremely unlikely.)

After booting from an 3.0-series kernel (or not, if you decided to forego that), you can remove the 3.1-series kernel you installed by running this command:

sudo apt-get purge linux-headers-3.1.0-030100 linux-headers-3.1.0-030100-generic linux-image-3.1.0-030100-generic

Using remove instead of purge (as suggested in the other answers so far) will work too but may leave some left-over global configuration files; purge is probably preferable.

It's not necessary to search for the packages to remove using something like dpkg -l | grep "linux\-[a-z]*\-" (as this answer suggests) or sudo aptitude search ~i | grep linux-image (as this one suggests) because we know exactly what packages you installed (since you provided the instructions used to install them, which includes the exact package names). Your older (i.e., 3.0-series) kernels would not have been removed automatically, and the version for this kernel would not have changed since you installed it by manually downloading and installing the .deb files rather than by actually enabling the PPA. (If you'd installed it from the PPA, then you still wouldn't have to search--you could just ppa-purge the PPA.) We also do not have to worry about virtual packages being installed that would result in the 3.1-series kernel coming back automatically; installing those virtual packages would give you the newer kernel, but installing the newer kernel as you did above would not install those virtual packages.

Thus the steps described above should be quite sufficient.

share|improve this answer
Worked like a charm, too bad though. I was proud of myself for compiling a Kernel. It just didn't work out. Thanks, now I would like to accept the answer gave and give you a point. How do I do that.... –  chazdg Nov 23 '11 at 17:41
Well this is a good news bad news issue. Kernel 3.1 is gone, but the other two kernels flicker more frequently now and Gnome 3.2 is crashing a bit more frequently. Is there anything I can do about this? I had things under control with a flicker once in awhile after I installed ATI driver 11.11. Any help is appreciated! –  chazdg Nov 23 '11 at 19:22
@chazdg Since the flickering and application crashing is occurring with the 3.0-series kernels, too, maybe the problem wasn't with the 3.1-series kernel after all. I recommend posting a new question for help with the flickering and application crashing problems, as that's really a separate topic from the question of how to remove a 3.1-series kernel installed on an Oneiric system. If you still want to mark this as the accepted answer, click the gray check mark next to it, which will turn green. If you also want to upvote, click the up arrow. –  Eliah Kagan Nov 23 '11 at 21:43
Thanks for the help - I did as you suggested. Firefox and Chrome were crashing with Kernel 3.1. Now that that 3.1 is purged, Gnome 3.2 is flickering and crashing more frequently since the removal of kernel 3.1. I will post a new topic for the crashing issue. Good news is Firefox and Chrome are fine. Go figure! –  chazdg Nov 23 '11 at 22:02
add comment

First boot into a kernel that you DONT want to remove i.e. boot into 3.0.x not 3.1.x.

To remove the packages you have just installed, you will need to find out their names. Run the following in a terminal:


For example - in my case:

enter image description here

What you are looking for are similarly named kernel 3.1 packages -

For my example - I've highlighted similar packages I want to remove - the command syntax would be:

sudo apt-get remove linux-headers-2.6.38-11
sudo apt-get remove linux-headers-2.6.38-11-generic
sudo apt-get remove linux-image-2.6.38-11-generic

To make it easier, just copy and paste the package names after typing sudo apt-get remove

Finish off by running:

sudo update-grub
share|improve this answer
add comment

Reboot and from the grub menu you should be able to select the previous installed kernel, if your old kernel has been removed, you can find the package to install with sudo aptitude search linux-image

you can then find your 3.1 kernel using sudo aptitude search ~i | grep linux-image and remove with sudo apt-get remove linux-image-XXX

run sudo update-grub to remove the outdated kernel entries from the boot menu

share|improve this answer
add comment

Your Answer


