One day Zabbix told me that there is not enough free space on the /boot partition on one server
Before that, I upgraded the Ubuntu server with the commands:
apt update apt upgrade
Accordingly, the new version of the linux kernel was downloaded and saved to the /boot partition, and the old versions of the kernel can essentially be deleted, but in order for the server to start with the new version of the kernel, it must be rebooted, I do not recommend deleting the old kernels before rebooting, since I had a case when the server did not start due to a compatibility bug with some drivers and ancient installed components; in case of problems when starting the server, you can select previous versions of the kernel.
Reboot the server:
We are waiting for the server to start up with a new kernel and run a command that will automatically clean up the old versions of the kernel in the /boot section and other unnecessary components installed in the system:
I will give an example of how much disk space was used in my case, before and after executing the “apt autoremove” command:
df -h Filesystem Size Used Avail Use% Mounted on /dev/md1 487M 442M 20M 96% /boot df -h Filesystem Size Used Avail Use% Mounted on /dev/md1 487M 159M 303M 35% /boot