automatically remove
The command below can automatically remove unused Kernels.sudo apt autoremove
Manual removal
uname -r
View the currently used kernel, such as my current Kernel
4.4.0-104-generic
Do not remove the Kernel in use!
dpkg --list | grep linux-image
3. Remove unwanted old versions of Kernel
I want to remove multiple brace expansions that can be used in bash.
sudo apt-get purge linux-image-4.4.0-9{2,6,7}-generic
The command above removes three at a time.
linux-image-4.4.0-92-generic
linux-image-4.4.0-96-generic
linux-image-4.4.0-97-generic
If we only want to remove a specific kernel on the system.
sudo apt-get purge linux-image-4.4.0-93-generic
4. Update grub2. (linux boot loader)
update-grub2
5. Restart the system
reboot
No Comment
Post your comment