Free and Opensource software review, Operating system review, Tips and Tricks, System tweaks, troubleshooting, Tools and Techniques, Hacks

Uninstall or Remove Old Kernels in Fedora

FedoraWhen a computer is switched ON, the operating system is loaded into memory by a program called Boot Loader. GRand Unified Boot loader (GRUB) the most common Boot loader used in most computers running on Linux.

In Fedora when the boot options are displayed (in the case of a system with multiple operating system), GRUB also displays old kernels present installed in the system (Hold down the shift key while booting in systems having only single Linux operating system). This enables you to boot into older kernel versions. Multiple kernel versions get installed in the system when the kernel is upgraded, ie both kernels are installed in the system but  you will be able to use only one kernel at a time.

But in most cases the presence of this multiple kernel in the system is a waste of valuable resources (space in Hard Drive). Uninstalling older kernel versions and its development packages from the system can thus save a lot o space n the system.

Here is how I uninstalled old kernel versions in Fedora, by using the package-cleanup utility.

package-cleanup –oldkernels

The above command removes old kernels installed in the system but retains one old kernel. If you want to specify the number of kernels to be retained, then execute

 package-cleanup –oldkernels –count=<count>

The above command retains the number kernels you specify as count and removes the rest.There are also many advanced options available for this package-cleanup utility which can be obtained from the man page, by executing

man package-cleanup

Other useful options of package-cleanup

–problems
This option displays dependency problems in the local RPM database, if any problems are found, then it will exit with an exit code of 1.

usage :-  package-cleanup –problems

–dupes
This option scans for duplicates in the local RPM database.

usage :-   package-cleanup –dupes

–cleandupes
This option scan for duplicates in the local RPM database and clean out the older versions.

usage :-   package-cleanup –cleandupes

, , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *