I recently upgraded to kernel 3.4 in my Ubuntu 12.04. After that the computer is not booting up. So I used a previous kernel to boot up. Actually I don't want 3.4 kernel. So how can I remove it and use the previous one itself?
Source: https://wiki.ubuntu.com/Kernel/MainlineBuilds#Uninstalling_Mainline_Kernels |
||||
|
|
|
How did you install it? If you just grabbed a load of deb files and installed them, getting rid of it is as simple as just finding the packages and running I've just had a cup of coffee so you get to bare the full brunt of my bashfu this morning... This should tell you what kernels are installed:
Go through those and note the versions you want to nuke. Take care to also note your current install (uname -a) or any new kernels you have installed since booting. You don't want to remove the newest ones. Anyway when you've got an idea, you can bulk-remove them by adapting this command:
The words and numbers in the braces will be expanded at runtime so the packages this will actually target are:
You can mess around with this but for cleaning up I find this much safer than a wide-wildcard (as I currently on a 3.5.* kernel). Either way, read what apt-get is going to do before you say yes. Removing current kernels and all kernels is a surprisingly common predicament that Ubuntu users find themselves in. It's not unfixable but yeah, don't do it! Be especially careful with wildcards and apt-get. If you don't believe me run |
|||||||||
|