When you update Linux kernels in Ubuntu, the old Linux kernel version is not deleted automatically and it also appears in your boot menu and stays in your system and eating some of your system space. You can remove all unused old Linux kernels using synaptic package manager easily. You can also remove kernels using below Methods.
Remove old Unused Linux Kernels in Ubuntu
Remove Old Linux Kernels in Ubuntu Linux
First, find which kernel you are using to avoid the deletion of current Linux kernel version. Open the terminal app using ctrl+alt+t keys and run below command.
Important: Note your current Linux kernel version and do not remove your current Linux kernel.
Install Synaptic Package Manager
In your terminal application run below commands one by one. It will install the latest version of Synaptic Package Manager.
sudo apt update
sudo apt install synaptic
For the first time click the Reload button. After all loading then click the search icon from the right and type linux-image in Quick search field and click Search.
It will show all your old Linux kernel package being with linux -image name and the green selection boxes are currently installed versions. For easy view just click the installed version tab to sort show all installed kernels first.
If 5.15.0-50 is your current Linux version then linux-image-5.15.0-48 is older than linux-image-5.15.0-50
Now right click in your old version select mark for complete removal and click apply.
That’s it. It will remove the old linux kernel from your system.
This Post Has One Comment
may i ask, you forgot another steps, after complete removal, open terminal and do command “sudo update-grub2” and restart.