Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Old Kernels Not Removed  (Read 396 times)

Offline RunLevelZero

  • User
  • Posts: 39
[EN] Old Kernels Not Removed
« on: 2024/11/16, 01:12:47 »
Hello all. For some reason after autoclean and autoremove my old kernels are still there. Would someone help me out with the commands to clean this up please? It's the first time I've had this issue. Thanks in advance.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.417
    • Land of the Buckeye
Re: Old Kernels Not Removed
« Reply #1 on: 2024/11/16, 02:16:36 »
Code: [Select]
# kernel-remover
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline RunLevelZero

  • User
  • Posts: 39
Re: Old Kernels Not Removed
« Reply #2 on: 2024/11/16, 03:01:40 »
Code: [Select]
# kernel-remover

Thank you. I’ll do this in the morning. Appreciate the quick response.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.417
    • Land of the Buckeye
Re: Old Kernels Not Removed
« Reply #3 on: 2024/11/16, 13:43:27 »
Code: [Select]
# apt autoremove is configured in siduction to remove the oldest kernel, but leave the next oldest, so you have two kernels available after running the command.

Take a look at /etc/apt/apt.conf.d/01autoremove. You should see this:

Code: [Select]
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image-[a-z0-9]*$";
        "^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };

  VersionedKernelPackages
  {
        # kernels
        "linux-.*";
        "kfreebsd-.*";
        "gnumach-.*";
        # (out-of-tree) modules
        ".*-modules";
        ".*-kernel";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "tasks";
  };

  Move-Autobit-Sections
  {
        "oldlibs";
  };
};
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline RunLevelZero

  • User
  • Posts: 39
Re: Old Kernels Not Removed
« Reply #4 on: 2024/11/16, 15:41:45 »
Code: [Select]
# apt autoremove is configured in siduction to remove the oldest kernel, but leave the next oldest, so you have two kernels available after running the command.

Take a look at /etc/apt/apt.conf.d/01autoremove. You should see this:

Code: [Select]
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image-[a-z0-9]*$";
        "^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };

  VersionedKernelPackages
  {
        # kernels
        "linux-.*";
        "kfreebsd-.*";
        "gnumach-.*";
        # (out-of-tree) modules
        ".*-modules";
        ".*-kernel";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "tasks";
  };

  Move-Autobit-Sections
  {
        "oldlibs";
  };
};

Indeed I do see this. I will wait for your feedback before running any removal commands. I have never had this problem in the years I've used Siduction.
Code: [Select]
APT
{
  NeverAutoRemove
  {
"^firmware-linux.*";
"^linux-firmware$";
"^linux-image-[a-z0-9]*$";
"^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };

  VersionedKernelPackages
  {
# kernels
"linux-.*";
"kfreebsd-.*";
"gnumach-.*";
# (out-of-tree) modules
".*-modules";
".*-kernel";
  };

  Never-MarkAuto-Sections
  {
"metapackages";
"tasks";
  };

  Move-Autobit-Sections
  {
"oldlibs";
  };
};

Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 1.072
Re: Old Kernels Not Removed
« Reply #5 on: 2024/11/16, 17:15:01 »
Do you have the same error like in this thread?
https://forum.siduction.org/index.php?topic=9509.0

Offline helux

  • User
  • Posts: 19
Re: Old Kernels Not Removed
« Reply #6 on: 2024/11/16, 19:39:35 »
... is configured in siduction to remove the oldest kernel, but leave the next oldest, so you have two kernels available after running the command...

Diese Info könnte vielleicht auch ins Handbuch.  8)

Offline RunLevelZero

  • User
  • Posts: 39
Re: Old Kernels Not Removed
« Reply #7 on: 2024/11/17, 15:26:17 »
Thanks but I do not get an error at all.
Do you have the same error like in this thread?
https://forum.siduction.org/index.php?topic=9509.0

Offline RunLevelZero

  • User
  • Posts: 39
Re: Old Kernels Not Removed
« Reply #8 on: 2024/11/17, 15:29:58 »
This worked perfectly thank you very much. Hopefully autoclean will now work like it has for the last 6 years for me. As always I appreciate the help and assistance.
Code: [Select]
# kernel-remover