Linux lives and dies by the kernel. If you’re familiar with how GNU/Linux works, Linux is the kernel. Everything else is just tools that interface with it. These tools let you get actual work done, but they couldn’t do a thing without the kernel.
The kernel of an operating system is kind of like your cardiovascular system. You tend to forget about it until something goes wrong. It isn’t all that often, but kernel upgrades can and do go wrong. When the updated kernel won’t let you use your computer, it’s time to downgrade.
Boot into an Older Kernel
The good news if you’ve recently updated your kernel is that this process almost never gets rid of the old kernel. The only case where that may happen is if you immediately uninstalled the older kernel, which isn’t a great idea.
To boot into an older computer, you’ll need to restart your computer. When the computer loads GRUB, you may need to hit a key to select non-standard options. On some systems, the older kernels will be shown here, while on Ubuntu, you’ll need to select “Advanced options for Ubuntu” to find older kernels.
Once you select the older kernel, you’ll boot into your system. Everything should work as it used to. If you’re still having trouble, the kernel may not be the issue.
Remove the Problem Kernel
If you’ve booted into your computer and everything is working as intended, the upgraded kernel is likely the problem. You could technically just do this every time you boot your computer, but it makes more sense to remove the problematic kernel.
You can do this using your distribution’s package management tools. This is going to differ based on the system you’re using. You’ll also need to know the version of the kernel you want to remove. This can be found during bootup at the GRUB screen. For Ubuntu and other apt-based distributions, you can use a command like the following:
sudo apt remove linux-image-VERSION-generic linux-headers-VERSION-generic
You’ll need to replace
VERSION above with the exact version number of the problem kernel you’re looking to remove. If you just wish to hold them back for a time, you can use the following command:
sudo apt-mark hold linux-image-generic linux-headers-generic
Avoiding Future Issues
One of the easiest ways to avoid this type of problem is to avoid updating right away. This will give you a chance to see whether any reports of users having kernel trouble will pop up. You should especially keep an eye out for users with similar hardware to you.
If stability is key to you, you can also opt to use LTS distributions. These update less frequently, aside from security updates. This means you can count on these being more stable than your average distro.
Frequently Asked Questions
Will downgrading my kernel break anything?
When you’re dealing with such a core part of the operating system, this is always a possibility. That said, if you’ve only upgraded, reverting back to an older kernel shouldn’t cause too many problems.
Drivers and other software that interfaces directly with the kernel may have errors. If the older versions of this software have been removed or updated, you may need to downgrade this as well.
Can I tell if a kernel update is going to work on my system?
As mentioned above, it’s always handy to check user reports before undertaking a major upgrade. Make sure to look at user forums based on the Linux distribution you use to see if there are any users experiencing major problems. If you see a significant number of users having issues, you may want to wait until they’re resolved before you upgrade.
How can I check the installed kernels on my system?
There are multiple commands to see which kernels are installed, depending on the Linux distribution you’re running. The following will work on most versions:
On Arch Linux and distributions based on Arch, you can use the following:
pacman -Q linux
On Ubuntu, Debian, and systems based on either of them, you can use the command below:
dpkg --list | grep linux-image
On Red Hat, Fedora, and other similar distributions, you can use the command below:
rpm -qa kernel
This isn’t an exhaustive list, but it covers a fair number of distributions. If you use another distribution, check the documentation.
How can I tell which kernel I’m currently using?
You can accomplish this with a simple command. Open a terminal and type the following command.
You’ll see a string with the version information of the running kernel. It will look something like this:
A Look Under the Hood
While downgrading is the easiest way to deal with kernel-related issues, it isn’t the only way. The kernel isn’t the only part of the system that can cause problems with booting up. If your system won’t start, it can be incredibly frustrating.
Searching the internet for your problems can be useful, but it helps if you understand what’s going on under the hood, so to speak. To get a better idea about what’s happening when you start your system, check out our guide to understanding the Linux boot process.
Our latest tutorials delivered straight to your inbox