Contents
How to remove old kernels without specifying the version?
Never use YUM or DNF to remove old kernel packages without specifying the kernel version. We always need at least one kernel package installed on the server while yum/dnf may remove all the installed kernels if you don’t specify the version.
How to uninstall old kernels in yum utils?
Using package-cleanup command which is a part of yum-utils package we can uninstall any number of old kernels automatically. As an example using –oldkernels –count=2 option with package-cleanup command the command will remove all unused kernel while keeping last three most recent kernel versions installed.
How to remove old unused kernels on CentOS Linux?
Instructions 1 Check for current Kernel 2 List all installed kernels. Kernel kernel-3.10.0-693.5.2.el7.x86_64 is currently loaded and used. 3 Remove old kernels manually 4 Remove old unused kernel automatically. 5 Configure yum to auto-remove old kernels.
Is it safe to remove kernels from Ubuntu 18.04?
You should now know several methods to remove old kernels from Ubuntu 19.04, 18.04, & 16.04 or older. Purging kernels can help you recover wasted disk space in linux. It’s also considered a best practice for good system hygiene, to prune out old files and dependencies.
Is the kernel 4.18.0 an active kernel?
But then kernel-4.18.0-147.5.1.el8_1.x86_64 is the active kernel. Now I am not sure if this is by design or a BUG. Hopefully it should be by design because the man page clearly says, ” Removes old installonly packages ” which in our case is the active kernel.
Why are there no other kernels installed in CentOS?
1. The kernel came from distro, as a result of previous upgrades: 2. There aren’t other kernels installed. Please check the contents of /boot: Hmm, then I would suggest the following. Download the packages in question ( dnf –downloadonly upgrade ), then reboot into the rescue kernel and install them with rpm -i:
How to properly remove old kernels RHEL / CentOS 8?
You can use rpm -e to remove the kernel but you have to make sure you also remove the mapping dependencies. This may be hard for every user to check so you can use yum remove kernel- to remove specific version of the kernel and all it’s dependencies