Skip to content

Old linux-tools packages are not removed on LM22.1 when removing old kernels #946

Description

@rjys365

Describe the bug
In Ubuntu 24.04, two more packages are installed along with kernel update. In GA kernel updates, they are linux-tools-6.8.0-xx-generic and linux-tools-6.8.0-xx. In HWE kernel updates, they are linux-tools-6.xx.0-xx-generic and linux-hwe-6.xx-tools-6.xx.0-xx. The packages contain the tools that are specific to Linux kernel versions, such as perf. However, when a kernel is removed using Mint Update, only the linux-headers, linux-image and linux-modules of that kernel is removed and the linux-tools packages are kept.

I have created a post in the Linux Mint Forums and the issue is also experienced by other users. (Credits to SMG in the forum who checked that this doesn't happen on LM21 which is based on Ubuntu 22.04)

Screenshots
Output of dpkg showing extra linux-tools packages:

$ dpkg -l | grep linux-tools
ii  linux-tools-6.11.0-25-generic                  6.11.0-25.25~24.04.1                       amd64        Linux kernel version specific tools for version 6.11.0-25
ii  linux-tools-6.11.0-26-generic                  6.11.0-26.26~24.04.1                       amd64        Linux kernel version specific tools for version 6.11.0-26
ii  linux-tools-6.8.0-58                           6.8.0-58.60                                amd64        Linux kernel version specific tools for version 6.8.0-58
ii  linux-tools-6.8.0-58-generic                   6.8.0-58.60                                amd64        Linux kernel version specific tools for version 6.8.0-58
ii  linux-tools-6.8.0-59                           6.8.0-59.61                                amd64        Linux kernel version specific tools for version 6.8.0-59
ii  linux-tools-6.8.0-59-generic                   6.8.0-59.61                                amd64        Linux kernel version specific tools for version 6.8.0-59
ii  linux-tools-6.8.0-60                           6.8.0-60.63                                amd64        Linux kernel version specific tools for version 6.8.0-60
ii  linux-tools-6.8.0-60-generic                   6.8.0-60.63                                amd64        Linux kernel version specific tools for version 6.8.0-60
ii  linux-tools-common                             6.8.0-60.63                                all          Linux kernel version specific tools for version 6.8.0

To Reproduce
Steps to reproduce the behavior:

  1. Install a kernel update (whether manually using apt or using Mint Update)
  2. Use Mint Update to remove the old kernel
  3. Check for relevant packages by using dpkg -l | grep linux-
  4. See the linux-tools packages of old kernel are still there

Expected behavior
The linux-tools packages (two for each kernel version) should be removed.

Distribution:

  • Linux Mint
  • LMDE
  • Other (please specify)

Software version:
7.0.7

Logs:
I didn't get the logs when removing old kernels, so I can't paste relevant logs here, sorry.

Additional context
Links to the packages at pkgs.org:

Latest linux-tools packages for Ubuntu 24.04 GA kernel:

Latest linux-tools packages for Ubuntu 24.04 HWE kernel:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions