Announcement

Collapse
No announcement yet.

Why did this happen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Why did this happen

    Yesterday, Apt installed kernel 6.8.0-58​ and then purged it. Why!

    Start-Date: 2025-04-16 19:28:15
    Commandline: apt full-upgrade -V -y
    Install: linux-image-6.8.0-58-generic:amd64 (6.8.0-58.60+1, automatic), linux-headers-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic), linux-modules-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic), linux-tools-6.8.0-58:amd64 (6.8.0-58.60, automatic), linux-headers-6.8.0-58:amd64 (6.
    8.0-58.60, automatic), linux-tools-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic), linux-modules-extra-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic)
    Upgrade: linux-tools-common:amd64 (6.8.0-57.59, 6.8.0-58.60), linux-headers-generic:amd64 (6.8.0-57.59, 6.8.0-58.60), gir1.2-gtk-3.0:amd64 (3.24.41-4ubuntu1.2, 3.24.41-4ubuntu1.3), linux-generic:amd64 (6.8.0-57.59, 6.8.0-58.60), linux-image-generic:amd64 (6.8.0-57.59, 6.8.0-58.60),
    gtk-update-icon-cache:amd64 (3.24.41-4ubuntu1.2, 3.24.41-4ubuntu1.3), libgtk-3-common:amd64 (3.24.41-4ubuntu1.2, 3.24.41-4ubuntu1.3), libgtk-3-bin:amd64 (3.24.41-4ubuntu1.2, 3.24.41-4ubuntu1.3), libgtk-3-0t64:amd64 (3.24.41-4ubuntu1.2, 3.24.41-4ubuntu1.3), linux-libc-dev:amd64 (6.8.
    0-57.59, 6.8.0-58.60)
    End-Date: 2025-04-16 19:30:02

    Start-Date: 2025-04-16 19:30:07
    Commandline: apt remove -y --purge linux-image-6.8.0-58-generic linux-headers-6.8.0-58-generic
    Purge: linux-headers-generic:amd64 (6.8.0-58.60), linux-image-6.8.0-58-generic:amd64 (6.8.0-58.60+1), linux-headers-6.8.0-58-generic:amd64 (6.8.0-58.60), linux-generic:amd64 (6.8.0-58.60), linux-image-generic:amd64 (6.8.0-58.60)
    End-Date: 2025-04-16 19:30:11

    Start-Date: 2025-04-16 19:30:12
    Commandline: apt autoremove -y --purge
    Purge: libbpfcc:amd64 (0.29.1+ds-1ubuntu7), iucode-tool:amd64 (2.3.1-3build1), python3-bpfcc:amd64 (0.29.1+ds-1ubuntu7), linux-modules-6.8.0-58-generic:amd64 (6.8.0-58.60), libllvm18:amd64 (1:18.1.3-1ubuntu1), libclang1-18:amd64 (1:18.1.3-1ubuntu1), ieee-data:amd64 (20220827.1), pyt
    hon3-netaddr:amd64 (0.8.0-2ubuntu1), libclang-cpp18:amd64 (1:18.1.3-1ubuntu1), linux-tools-6.8.0-58:amd64 (6.8.0-58.60), bpftrace:amd64 (0.20.2-1ubuntu4.3), linux-headers-6.8.0-58:amd64 (6.8.0-58.60), bpfcc-tools:amd64 (0.29.1+ds-1ubuntu7), linux-tools-6.8.0-58-generic:amd64 (6.8.0-
    58.60), ubuntu-kernel-accessories:amd64 (1.539.2), thermald:amd64 (2.5.6-2ubuntu0.24.04.2), linux-modules-extra-6.8.0-58-generic:amd64 (6.8.0-58.60), amd64-microcode:amd64 (3.20231019.1ubuntu2.1), intel-microcode:amd64 (3.20250211.0ubuntu0.24.04.1)
    End-Date: 2025-04-16 19:30:26


    Last edited by Snowhog; Apr 17, 2025, 05:47 PM.
    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
    Is that from scripting, automatic-updates or something like that?

    My apt history format looks a little bit different, such as it showing the full path to the command used, even if though I didn't do so in the terminal. It also lists packages that can be removed under "Remove:" which show in the terminal as "no longer required" iirc.

    So I assume you have something automating things?

    My bare metal Noble install went poof! (the ssd died) but my outputs looks the same across two 24.04 neon installs and my 24.04 VM.


    Code:
    Start-Date: 2025-04-16  19:40:38
    Commandline: /usr/bin/apt full-upgrade
    Requested-By: my-dumb-username (1000)
    Install: linux-image-6.8.0-58-generic:amd64 (6.8.0-58.60+1, automatic), linux-headers-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic), linux-modules-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic), linux-tools-6.8.0-58:amd64 (6.8.0-58.60, automatic), linux-headers-6.8.0-58:amd64 (6.8.0-58.60, automatic), linux-tools-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic), linux-modules-extra-6.8.0-58-generic:amd64 (6.8.0-58.60, automatic)
    Upgrade: linux-tools-common:amd64 (6.8.0-57.59, 6.8.0-58.60), linux-headers-generic:amd64 (6.8.0-57.59, 6.8.0-58.60), libshiboken6-py3-6.8:amd64 (6.8.2.1-3zneon+24.04+noble+release+build54, 6.8.3-0zneon+24.04+noble+release+build56), plasma-workspace:amd64 (4:6.3.4-0zneon+24.04+noble+release+build32, 4:6.3.4-0zneon+24.04+noble+release+build33), drkonqi-pk-debug-installer:amd64 (0.1+p24.04+vrelease+git20250306.0019-0, 0.1+p24.04+vrelease+git20250416.1156-0), libpyside6-py3-6.8:amd64 (6.8.2.1-3zneon+24.04+noble+release+build54, 6.8.3-0zneon+24.04+noble+release+build56), osinfo-db:amd64 (0.20240523-0ubuntu0.24.04.1, 0.20250124-0ubuntu0.24.04.1), plasma-workspace-wayland:amd64 (4:6.3.4-0zneon+24.04+noble+release+build32, 4:6.3.4-0zneon+24.04+noble+release+build33), linux-generic:amd64 (6.8.0-57.59, 6.8.0-58.60), sddm-theme-breeze:amd64 (4:6.3.4-0zneon+24.04+noble+release+build32, 4:6.3.4-0zneon+24.04+noble+release+build33), linux-image-generic:amd64 (6.8.0-57.59, 6.8.0-58.60), pyside6-tools:amd64 (6.8.2.1-3zneon+24.04+noble+release+build54, 6.8.3-0zneon+24.04+noble+release+build56), python3-pyside6.qtcore:amd64 (6.8.2.1-3zneon+24.04+noble+release+build54, 6.8.3-0zneon+24.04+noble+release+build56), linux-libc-dev:amd64 (6.8.0-57.59, 6.8.0-58.60)
    Remove: linux-modules-6.8.0-57-generic:amd64 (6.8.0-57.59), linux-image-6.8.0-57-generic:amd64 (6.8.0-57.59), linux-headers-6.8.0-57-generic:amd64 (6.8.0-57.59), linux-tools-6.8.0-57-generic:amd64 (6.8.0-57.59), linux-modules-extra-6.8.0-57-generic:amd64 (6.8.0-57.59)
    End-Date: 2025-04-16  19:41:58​
    Note the packages under 'Remove" are still there until I ran autoremove the next day.


    So who told apt to do that, and why? Something that purges old kernels, or rather keeps a specific number?

    Even if one is on the 6.11 kernel , if the system originally had 6.8, Ubuntu will keep one original 6.8 kernel around as well as two of the current HWE ones (6.11) It is possible whatever logic is being used to keep track is faulty, but there probably would be more reports of this sort of thing, I'd think.

    Comment


      #3
      Yeah, I'm on kernel 6.11 but apt always installs a 6.8 kernel too when it updates! Then autoremove removes the previous 6.8 and 6.11 kernels.
      I don't really need to have 6.8 on my machine as I have no problems with 6.11...
      Constant change is here to stay!

      Comment


        #4
        Originally posted by Beerislife View Post
        I don't really need to have 6.8 on my machine as I have no problems with 6.11...
        Same as it was before

        https://www.kubuntuforums.net/forum/...794#post671794

        You remove the "stock" original kernel meta-package (linux-image-generic) so you only use the linux-image-generic-hwe-24.04
        meta-package to supply the current (and future) HWE kernel.

        Comment


          #5
          I do use a script: ucaresystem-core from https://launchpad.net/~utappia/+archive/ubuntu/stable

          I’ll contact the author and ask if he can identify why this happened. I’ve been using his script for quite some time now. I am a supporter of his work.
          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


            #6
            Hmmmm....

            What’s New in This Release?
            • Safer Kernel Cleanup
              Improved kernel cleanup logic with better validation, replacing the old code by Canonical engineer Dustin Kirkland that was used for more than 6+ years !.


            The script appears to keep 2 kernels by default, so it does seem logical for it to remove the 6.8 one, though why it hadn't before, I can't say.
            However, it considers the meta-package as an actual kernel, which is false.
            it nuked all of my kernels and kernel meta-packages, save for one of each:

            Code:
            $ apt search linux-image | grep installed
            
            WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
            
            linux-image-6.11.0-24-generic/noble-updates,now 6.11.0-24.24~24.04.1 amd64 [installed,automatic] <---actual kernel
            linux-image-generic-hwe-24.04-edge/noble-updates,now 6.11.0-24.24~24.04.1 amd64 [installed]<---metapackage
            Here is what I had before:

            Code:
            linux-image-6.11.0-21-generic/noble-security,noble-updates,now 6.11.0-21.21~24.04.1+1 amd64 [installed,automatic]
            linux-image-6.11.0-24-generic/noble-updates,now 6.11.0-24.24~24.04.1 amd64 [installed,automatic]
            linux-image-6.8.0-58-generic/noble-updates,now 6.8.0-58.60+1 amd64 [installed,automatic]
            linux-image-generic/noble-updates,now 6.8.0-58.60 amd64 [installed,automatic]
            linux-image-generic-hwe-24.04/noble-updates,now 6.11.0-24.24~24.04.1 amd64 [installed,automatic]
            linux-image-generic-hwe-24.04-edge/noble-updates,now 6.11.0-24.24~24.04.1 amd64 [installed]
            The first three are actual kernels, the last three are metapackages., the last one added by me, as explained a bit later.




            So, I only actually have ONE actual kernel left on my system.
            The tool thinks I have 6 kernels installed, which is quite inaccurate. I have three kernels and three metapackages. Normal Ubuntu LTS would have one or two kernel metapackages, depending on the ISO used.

            Code:
            Starting kernel cleanup...
            Current kernel: 6.11.0-24-generic
            Found 6 kernels, keeping 2, will remove 4
            The following kernels will be removed:
            linux-image-6.8.0-58-generic <--- non-HWE
            linux-image-6.11.0-21-generic <----previous HWE
            linux-image-generic <---[metapackage for the "GA" stock kernel]
            linux-image-generic-hwe-24.04 <---[metapackage for the HWE kernel]
            
            ​
            Now, the last one above is only being removed because I have an extra metapackage manually added (the hwe-edge. which can have the next HWE kernel upgrade a little early, for testing. It doers not add a new kernel at this time, it depends on the same things the normal HWE does at the moment.)

            Another test on my laptop, which doesn't have this extra, still leaves me with only 1 kernel + 1 metapackage

            Time for a rollback.

            [yes, I know this is a neon system, but in terms of kernels and metapackages, it is pure 100% Ubuntu]




            it also uninstall a LOT of stuff I actually want and need, along with some cruft.

            Code:
              blueman* bpfcc-tools* bpftrace* bridge-utils* chromium* dkms* fakechroot* firefox-nightly*
              google-chrome-beta* haveged* kpim6-akonadi-calendar* kpim6-akonadi-search* kpim6-kcalendarutils*
              kpim6-kdepim-runtime* kpim6-kidentitymanagement* kpim6-kimap* kpim6-libgravatar* kpim6-libkdepim*
              kpim6-libkleo* kpim6-mailcommon* libbpfcc* libfakechroot* liblxc-common* linux-headers-6.8.0-58*
              linux-hwe-6.11-headers-6.11.0-21* linux-hwe-6.11-tools-6.11.0-21* linux-image-6.11.0-17-generic*
              linux-image-6.11.0-19-generic* linux-image-6.8.0-45-generic* linux-image-6.8.0-47-generic*
              linux-image-6.8.0-48-generic* linux-image-6.8.0-49-generic* linux-image-6.8.0-50-generic*
              linux-image-6.8.0-51-generic* linux-image-6.8.0-52-generic* linux-image-6.8.0-53-generic*
              linux-image-6.8.0-54-generic* linux-image-6.8.0-55-generic* linux-image-6.8.0-56-generic*
              linux-image-6.8.0-57-generic* linux-modules-6.11.0-17-generic* linux-modules-6.11.0-19-generic*
              linux-modules-6.11.0-21-generic* linux-modules-6.8.0-45-generic* linux-modules-6.8.0-47-generic*
              linux-modules-6.8.0-48-generic* linux-modules-6.8.0-49-generic* linux-modules-6.8.0-50-generic*
              linux-modules-6.8.0-51-generic* linux-modules-6.8.0-52-generic* linux-modules-6.8.0-53-generic*
              linux-modules-6.8.0-54-generic* linux-modules-6.8.0-55-generic* linux-modules-6.8.0-56-generic*
              linux-modules-6.8.0-57-generic* linux-modules-6.8.0-58-generic* linux-modules-extra-6.11.0-17-generic*
              linux-modules-extra-6.11.0-19-generic* linux-modules-extra-6.11.0-21-generic*
              linux-modules-extra-6.8.0-45-generic* linux-modules-extra-6.8.0-47-generic*
              linux-modules-extra-6.8.0-48-generic* linux-modules-extra-6.8.0-49-generic*
              linux-modules-extra-6.8.0-50-generic* linux-modules-extra-6.8.0-51-generic*
              linux-modules-extra-6.8.0-52-generic* linux-modules-extra-6.8.0-53-generic*
              linux-modules-extra-6.8.0-54-generic* linux-modules-extra-6.8.0-55-generic*
              linux-modules-extra-6.8.0-56-generic* linux-modules-extra-6.8.0-57-generic*
              linux-modules-extra-6.8.0-58-generic* linux-tools-6.11.0-21-generic* linux-tools-6.8.0-58*
              linux-tools-6.8.0-58-generic* lxc* lxcfs* python3-bpfcc* python3-netaddr* qemu-guest-agent* rtl88x2bu-dkms*
              samba* thunderbird* ubuntu-kernel-accessories* waydroid*
            Code:
            
            
            Ok, these were old configs, not many actual packages.

            I almost got cranky there for a sec.


            OFFTOPIC:
            if you don't really care about having the old/original "GA" kernel at all, you can follow what I linked to above.


            I need to pester the kubuntu devs as to why Kubuntu LTS ISOs don't include the hwe metapackage by default until the .2 image , while Ubuntu has this ootb, ready for when HWE is released. Kubuntu installs from the first two LTS ISO releases need to manually do this. I think?
            Last edited by claydoh; Apr 18, 2025, 12:34 AM.

            Comment

            Working...
            X