My /boot/ is running out of disk space and I see 8 different versions of Ubuntu Linux 20.04 LTS kernel. Is there is anyway to remove all unused old kernels on Ubuntu 20.04 LTS server safely? What command I need to punch in to delete old kernels from Ubuntu version 20.04? Please advice.
Ubuntu only keeps the last three kernels. But for some reasons, if you have more than three Linux kernel, try the following procedure. And yes, it is a safe procedure.
Removing all unused old Linux kernels on Ubuntu 20.04 LTS server or desktop
- As always, keep backup all data.
- Get the current disk space usage by running the
- Open the terminal and then type any one of the following command to delete old Linux kernels on Ubuntu 20.04 LTS system:
sudo apt --purge autoremove
sudo apt-get --purge autoremove
- Veriy disk space by typing the