Is there is a command to delete older kernel in an Ubuntu Linux 18.04 server? I see so many kernel installed in my server at AWS EC2. How to tell Ubuntu Linux to delete older kernels?
The procedure to delete older kernel in Ubuntu is pretty simple:
- Login to your server
- Type
sudo apt --purge autoremove
to delete and purge all outdated and older Ubuntu Linux kernels. - Reboot the server if new Ubuntu Linux kernel was installed by running
sudo reboot
- Verify by running either
df -H
orsudo dpkg --list | egrep -i --color 'linux-image|linux-headers
For more info see my page
https://www.cyberciti.biz/faq/ubuntu-18-04-remove-all-unused-old-kernels/