Announcement

Collapse
No announcement yet.

Can I safely remove these?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I safely remove these?

    I upgraded my 22.04 LTS to 22.10 (sudo do-release-upgrade -d). The new system is running very nicely, but sudo dpkg --list | egrep 'linux-image|linux-headers' includes:

    linux-image-generic-hwe-22.04
    linux-headers-generic-hwe-22.04

    in the output.

    Is there a valid reason that the upgrade process didn't remove these? Should I keep them, or can I manually purge them?
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    At this point, it might be worth keeping these meta-packages, since you upgraded early. At least until 21.10 hits Feature Freeze next week, when the system level things should be locked down. Maybe they would be marked for autoremove after that, though doing things early might also have broken the usual kernel autoremove settings

    I imagine you can uninstall those meta-packages, as well as the actual kernel and header packages they depend on, if they aren't prompted for autoremove as one would expect, or they will be marked for it once you have more kernel versions installed.
    I think that upgrades had always kept old kernels in the past, but I can be wrong on this, and even in current releases, there are LTS/HWE kernel packages from older releases available. Probably for those special edge cases.

    Which kernels to you actually have installed? I just noticed your command lists *all* packages that have, or had been, not just currently installed ones

    Try this
    dpkg --list | egrep 'linux-image|linux-headers' | grep '^ii'
    you don't need sudo, and the "ii" filters the output to show only installed packages

    In the normal output, you will see 'ii' and 'rc' marked next to each package
    ii means 'It should be installed and it is installed' whereas
    rc means 'It's removed/uninstalled but it's configuration files are still there'

    Or look for things with apt instead of dpkg: apt search linux-image | grep installed


    Debian stuff is sooo bloody confusing sometimes, even after all these years.
    Last edited by claydoh; Aug 20, 2022, 12:59 PM.

    Comment


      #3
      claydoh This list entries are all "ii"

      ii linux-headers-5.15.0-46
      ii linux-headers-5.15.0-46-generic
      ii linux-headers-5.15.0-47
      ii linux-headers-5.15.0-47-generic
      ii linux-headers-generic
      ii linux-headers-generic-hwe-22.04
      ii linux-image-5.15.0-46-generic
      ii linux-image-5.15.0-47-generic
      ii linux-image-generic
      ii linux-image-generic-hwe-22.04
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Originally posted by claydoh View Post
        Or look for things with apt instead of dpkg: apt search linux-image | grep installed
        Output of command:
        paul@barley-cat:~$ apt search linux-image | grep installed

        WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

        alsa-base/kinetic,kinetic,now 1.0.25+dfsg-0ubuntu7 all [installed]
        linux-image-5.15.0-46-generic/now 5.15.0-46.49 amd64 [installed,local]
        linux-image-5.15.0-47-generic/now 5.15.0-47.51 amd64 [installed,local]
        linux-image-generic/now 5.15.0.47.47 amd64 [installed,local]
        linux-image-generic-hwe-22.04/now 5.15.0.47.47 amd64 [installed,local]
        paul@barley-cat:~$ apt search linux-headers | grep installed

        WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

        linux-headers-5.15.0-46/now 5.15.0-46.49 all [installed,local]
        linux-headers-5.15.0-46-generic/now 5.15.0-46.49 amd64 [installed,local]
        linux-headers-5.15.0-47/now 5.15.0-47.51 all [installed,local]
        linux-headers-5.15.0-47-generic/now 5.15.0-47.51 amd64 [installed,local]
        linux-headers-generic/now 5.15.0.47.47 amd64 [installed,local]
        linux-headers-generic-hwe-22.04/now 5.15.0.47.47 amd64 [installed,local]
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          So, Kinetic is still on the 5.15 kernel ?? Same as 22.04 (and 20.04, for that matter)? I'd have figured that they would be an a more fresh kernel release by now. Might want to check where the kernels came from apt policy packagename

          Actually, looking at the latest ISO image package manifest, linux-image-5.15.0-27 may be the current kernel in Kinetic (at least on the daily ISO for both Ubuntu and Kubuntu), and Jammy has more recent versions (the ones you have installed) I wonder why that is? Or maybe they are waiting for the 5.20 6.0 kernel, or the 5.19 to settle in?
          The actual kernel version freeze doesn't happen till October, so there is gobs of time.

          If you can't tell, I stopped running in a perpetual-devel-release-as-my-daily-os quite some time ago now, lol

          so tl;dr
          leave it alone for now
          Last edited by claydoh; Aug 20, 2022, 01:19 PM.

          Comment


            #6
            Originally posted by claydoh View Post
            leave it alone for now
            Yup.

            I searched Muon Package Manager for linux-image-generic-hwe- and linux-headers-gneric-hwe- By Status Installed, and 22.04 is the only one listed. Searching By Status Not Installed, only virtual-hwe and generic-hwe for 20.04-edge, 22.04-edge, and 22.04 and 22.04-edge are listed.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              You got me to looking, Snowhog , and using claydoh's nifty command in a script (for future reference) I found half a dozen headers+images combos.
              My #1 boot kernel is 1048-oem and the previous one is 1047-oem. So, using Muon I removed the others. Using Claydoh's command again I got:

              jerry@jerry-hp17cn1xxx:~$ ./check_headers_and+images.sh
              ii linux-headers-5.14.0-1047-oem 5.14.0-1047.54 amd64 Linux kernel headers for version 5.14.0 on 64 bit x86 SMP
              ii linux-headers-5.14.0-1048-oem 5.14.0-1048.55 amd64 Linux kernel headers for version 5.14.0 on 64 bit x86 SMP
              ii linux-image-5.14.0-1047-oem 5.14.0-1047.54 amd64 Signed kernel image oem
              ii linux-image-5.14.0-1048-oem 5.14.0-1048.55 amd64 Signed kernel image oem
              and using your command I got:
              jerry@jerry-hp17cn1xxx:~$ apt search linux-image | grep installed

              WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

              linux-image-5.14.0-1047-oem/focal-updates,now 5.14.0-1047.54 amd64 [installed]
              linux-image-5.14.0-1048-oem/focal-security,focal-updates,now 5.14.0-1048.55 amd64 [installed,automatic]
              jerry@jerry-hp17cn1xxx:~$


              However, when I checked /boot I found:

              file:///boot/config-5.14.0-1046-oem
              file:///boot/config-5.14.0-1047-oem
              file:///boot/config-5.14.0-1048-oem
              file:///boot/initrd.img
              file:///boot/initrd.img-5.14.0-1047-oem
              file:///boot/initrd.img-5.14.0-1048-oem
              file:///boot/initrd.img.old
              file:///boot/memtest86+_multiboot.bin
              file:///boot/memtest86+.bin
              file:///boot/memtest86+.elf
              file:///boot/System.map-5.14.0-1046-oem
              file:///boot/System.map-5.14.0-1047-oem
              file:///boot/System.map-5.14.0-1048-oem
              file:///boot/vmlinuz
              file:///boot/vmlinuz-5.14.0-1047-oem
              file:///boot/vmlinuz-5.14.0-1048-oem
              file:///boot/vmlinuz.old
              So, using MC I deleted the -1046 files.

              Neither the -1046 kernel nor the others were in /boot/grub/grub.cfg so there was no reason it edit it.

              claydoh, I know that you claim to "ask Jeeves" but the depth and breadth of your answer is way beyond Jeeve's paygrade.
              Have you earned a cert?
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                Originally posted by GreyGeek View Post
                Have you earned a cert?
                There is a cert for typing into a search engine, and occasionally remembering something on my own

                Comment

                Working...
                X