List installed Proxmox kernels

List installed Proxmox kernels:

dpkg -l | cut -d" " -f3 | grep pve-kernel

List installed Proxmox kernels without currently used kernel:

dpkg -l | cut -d" " -f3 | grep pve-kernel | grep -v "$(uname -r)"

Remove unused kernels (this may remove the lastest kernel, if no reboot was done, since last kernel update):

for i in `dpkg -l | cut -d" " -f3 | grep pve-kernel | grep -v "$(uname -r)"`; do apt purge $i -y; done

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.