All nodes in the toolforge cluster have plenty of unused kernel packages, which complicates package upgrades and may occupy considerable amount of space in the filesystem.
Some examples:
aborrero@tools-prometheus-01:~$ dpkg -l | grep linux-image ii linux-image-3.16.0-4-amd64 3.16.43-2+deb8u5 amd64 Linux 3.16 for 64-bit PCs ii linux-image-3.16.0-5-amd64 3.16.51-3+deb8u1 amd64 Linux 3.16 for 64-bit PCs ii linux-image-4.4.0-1-amd64 4.4.2-3+wmf3 amd64 Linux 4.4 for 64-bit PCs ii linux-image-4.4.0-2-amd64 4.4.2-3+wmf6 amd64 Linux 4.4 for 64-bit PCs ii linux-image-4.4.0-3-amd64 4.4.2-3+wmf8 amd64 Linux 4.4 for 64-bit PCs ii linux-image-4.9.0-0.bpo.4-amd64 4.9.51-1~bpo8+1 amd64 Linux 4.9 for 64-bit PCs ii linux-image-4.9.0-0.bpo.5-amd64 4.9.65-3+deb9u1~bpo8+2 amd64 Linux 4.9 for 64-bit PCs ii linux-image-amd64 3.16+63+deb8u1 amd64 Linux for 64-bit PCs (meta-package)
aborrero@tools-paws-master-01:~$ dpkg -l | grep linux-image rc linux-image-4.9.0-3-amd64 4.9.30-2+deb9u5 amd64 Linux 4.9 for 64-bit PCs ii linux-image-4.9.0-5-amd64 4.9.65-3+deb9u2 amd64 Linux 4.9 for 64-bit PCs ii linux-image-4.9.0-6-amd64 4.9.82-1+deb9u3 amd64 Linux 4.9 for 64-bit PCs ii linux-image-amd64 4.9+80+deb9u4 amd64 Linux for 64-bit PCs (meta-package)
aborrero@tools-exec-1401:~$ dpkg -l | grep ^ii | grep linux-image ii linux-image-3.13.0-137-generic 3.13.0-137.186 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-139-generic 3.13.0-139.188 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-141-generic 3.13.0-141.190 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-142-generic 3.13.0-142.191 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-extra-3.13.0-137-generic 3.13.0-137.186 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP ii linux-image-extra-3.13.0-139-generic 3.13.0-139.188 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP ii linux-image-extra-3.13.0-141-generic 3.13.0-141.190 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP ii linux-image-generic 3.13.0.141.151 amd64 Generic Linux kernel image ii linux-image-virtual 3.13.0.142.152 amd64 This package will always depend on the latest minimal generic kernel image.
Depending on the OS (trusty, jessie, stretch), different versions are installed (and being run), so a common pattern in each should be find to do a cleanup.
This is related to the apt pinning task: T187193