Remove Old Kernel in PVE3

apmuthu

Renowned Member
Feb 26, 2009
868
11
83
Chennai - India & Singapore
github.com
After an apt-get update and apt-get dist-upgrade and subsequent rebooting, sometimes the kernel gets updated.

Check existing pve kernels:
Code:
dpkg --list | grep "pve-kernel-"
Sample output:
Code:
ii  pve-kernel-2.6.32-20-pve         2.6.32-100                    amd64        The Proxmox PVE Kernel Image
ii  pve-kernel-2.6.32-22-pve         2.6.32-107                    amd64        The Proxmox PVE Kernel Image
Check Current Working Kernel:
Code:
# uname -a
Linux dc06 2.6.32-22-pve #1 SMP Mon Jul 15 08:36:46 CEST 2013 x86_64 GNU/Linux
and remove old ones:
Code:
apt-get remove pve-kernel-2.6.32-20-pve
update-grub

Check the versions now with # pveversion -v:
Code:
pve-manager: 3.0-23 (pve-manager/3.0/957f0862)
running kernel: 2.6.32-22-pve
proxmox-ve-2.6.32: 3.0-107
pve-kernel-2.6.32-22-pve: 2.6.32-107
lvm2: 2.02.95-pve3
clvm: 2.02.95-pve3
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-1
pve-cluster: 3.0-4
qemu-server: 3.0-20
pve-firmware: 1.0-23
libpve-common-perl: 3.0-4
libpve-access-control: 3.0-4
libpve-storage-perl: 3.0-8
vncterm: 1.1-4
vzctl: 4.0-1pve3
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-13
ksm-control-daemon: 1.1-1
 
Last edited:
I did it like you described above because server rebootet is still under

dpkg --list | grep "pve-kernel-"

the old kernel is displayed that's right?




Code:
Using username "root".
Linux pve 4.13.13-6-pve #1 SMP PVE 4.13.13-40 (Fri, 16 Feb 2018 09:51:20 +0100)                                                                                                              x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Feb 19 16:54:21 2018 from 192.168.178.36
root@pve:~# cd '/root/'
root@pve:~# dpkg --list | grep "pve-kernel-"
rc  pve-kernel-4.13.13-1-pve             4.13.13-31                     amd64        The Proxmox PVE Kernel Image
rc  pve-kernel-4.13.13-2-pve             4.13.13-33                     amd64        The Proxmox PVE Kernel Image
rc  pve-kernel-4.13.13-5-pve             4.13.13-38                     amd64        The Proxmox PVE Kernel Image
ii  pve-kernel-4.13.13-6-pve             4.13.13-40                     amd64        The Proxmox PVE Kernel Image
rc  pve-kernel-4.13.4-1-pve              4.13.4-26                      amd64        The Proxmox PVE Kernel Image
root@pve:~# pveversion -v
proxmox-ve: 5.1-40 (running kernel: 4.13.13-6-pve)
pve-manager: 5.1-46 (running version: 5.1-46/ae8241d4)
pve-kernel-4.13.13-6-pve: 4.13.13-40
corosync: 2.4.2-pve3
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-common-perl: 5.0-28
libpve-guest-common-perl: 2.0-14
libpve-http-server-perl: 2.0-8
libpve-storage-perl: 5.0-17
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 2.1.1-2
lxcfs: 2.0.8-2
novnc-pve: 0.6-4
proxmox-widget-toolkit: 1.0-11
pve-cluster: 5.0-20
pve-container: 2.0-19
pve-docs: 5.1-16
pve-firewall: 3.0-5
pve-firmware: 2.0-3
pve-ha-manager: 2.0-5
pve-i18n: 1.0-4
pve-libspice-server1: 0.12.8-3
pve-qemu-kvm: 2.9.1-9
pve-xtermjs: 1.0-2
qemu-server: 5.0-21
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.4-pve2~bpo9
root@pve:~# uname -a
Linux pve 4.13.13-6-pve #1 SMP PVE 4.13.13-40 (Fri, 16 Feb 2018 09:51:20 +0100) x86_64 GNU/Linux
root@pve:~# dpkg --list | grep "pve-kernel-"
rc  pve-kernel-4.13.13-1-pve             4.13.13-31                     amd64        The Proxmox PVE Kernel Image
rc  pve-kernel-4.13.13-2-pve             4.13.13-33                     amd64        The Proxmox PVE Kernel Image
rc  pve-kernel-4.13.13-5-pve             4.13.13-38                     amd64        The Proxmox PVE Kernel Image
ii  pve-kernel-4.13.13-6-pve             4.13.13-40                     amd64        The Proxmox PVE Kernel Image
rc  pve-kernel-4.13.4-1-pve              4.13.4-26                      amd64        The Proxmox PVE Kernel Image
root@pve:~# update-grub
GRUB-Konfigurationsdatei wird erstellt …
Linux-Abbild gefunden: /boot/vmlinuz-4.13.13-6-pve
initrd-Abbild gefunden: /boot/initrd.img-4.13.13-6-pve
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
erledigt
root@pve:~#
 

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!