Page MenuHomePhabricator

trusty servers: purge old kernel packages
Closed, InvalidPublic

Description

@MoritzMuehlenhoff reported that we have a lot of old kernel packages in Trusty servers, which may fill up /boot (and produce a page).

Worth purging them.

This is an example in labnet1001.eqiad.wmnet:

aborrero@labnet1001:~ $ dpkg -l | grep linux-image
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-143-generic       3.13.0-143.192                                       amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-160-generic       3.13.0-160.210                                       amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-92-generic        3.13.0-92.139                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-124-generic        4.4.0-124.148~14.04.1                                amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-137-generic        4.4.0-137.163~14.04.1                                amd64        Linux kernel image for version 4.4.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-143-generic 3.13.0-143.192                                       amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-160-generic 3.13.0-160.210                                       amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-92-generic  3.13.0-92.139                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-124-generic  4.4.0-124.148~14.04.1                                amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-137-generic  4.4.0-137.163~14.04.1                                amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-generic                  3.13.0.160.170                                       amd64        Generic Linux kernel image
ii  linux-image-generic-lts-xenial       4.4.0.137.117                                        amd64        Generic Linux kernel image

We would need to:

  • identify which kernels we are running (should be apt pinned in puppet)
  • identify how many kernels do we want to keep (1, 2?)
  • purge the rest

Related Objects