clean /boot partition

informant

Renowned Member
Jan 31, 2012
762
10
83
Hi all,

my boot partition is full, how can i clean it correctly? only delete old files or does proxmox has a command for clean?

i have found this, but this command does clean updated kernel versions they are not activate well server was not restartet or?
Code:
apt-get remove $(dpkg -l | egrep  '^ii  (pve-)?kernel-' | awk '{print $2}' | grep -v `uname -r`)

best regards
 
Last edited:
Hi,

I would do this manually because you should have at minimum 2 running kernel versions on your host.
If something goes wrong you can use the other kernel to boot.
 
Hi wolfgang,

thanks for answer.
how do i correct remove the old versions and let only 2 of last kernels?

regards
 
apt-get remove pve-kernel-<version> you what remove.
and also the headers if they are installed.
apt-get remove pve-headers-<version> you what remove.

after this check, if you have still 2 kernels installed

ls -hl /boot/

the output must include for each version config-<version>-pve
initrd.img-<version>-pve
System.<version>-pve
vmlinuz-<version>-pve
 
hi, how can i do it automatical, to less only last 2 kernels, all other remove?
regards
 
hi apt-get autoremove do not remove/purge old kernel.... only manual apt-get remove --purge pve-kernel.. works here, i look for a option to rmeove old kernels with one command and 2 last kernels are stay.
regards
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!