Skip to content

kernels: Allow marking/unmarking kernels to be kept or autoremoved.#1048

Open
mtwebster wants to merge 1 commit intomasterfrom
kernel-mark-auto
Open

kernels: Allow marking/unmarking kernels to be kept or autoremoved.#1048
mtwebster wants to merge 1 commit intomasterfrom
kernel-mark-auto

Conversation

@mtwebster
Copy link
Copy Markdown
Member

When linuxmint/aptkit#14 is merged, it should fix the issue of all kernels being marked as 'manually' installed, preventing their removal via automatic cleanup options.

Add the option to the kernel management interface for the user to mark/unmark kernels they want to keep installed. This relies entirely on APT 'marking' - there is no setting where kernel names are stored.

Two APT rules are checked and applied at runtime:

APT::Protect-Kernels
APT::NeverAutoRemove::KernelCount

From: https://manpages.debian.org/unstable/apt/apt.conf.5.en.html

APT::NeverAutoRemove::KernelCount — Keep a custom amount of kernels when autoremoving and defaults to 2, meaning two kernels are kept. Apt will always keep the running kernel and the latest one. If the latest kernel is the same as the running kernel, the second latest kernel is kept. Because of this, any value lower than 2 will be ignored. If you want only the latest kernel, you should set APT::Protect-Kernels to false.

The checkbox for marking/unmarking will be disabled for kernels that fall under the rule.

When linuxmint/aptkit#14 is merged, it
should fix the issue of all kernels being marked as 'manually'
installed, preventing their removal via automatic cleanup options.

Add the option to the kernel management interface for the user to
mark/unmark kernels they want to keep installed. This relies entirely
on APT 'marking' - there is no setting where kernel names are stored.

Two APT rules are checked and applied at runtime:

APT::Protect-Kernels
APT::NeverAutoRemove::KernelCount

From: https://manpages.debian.org/unstable/apt/apt.conf.5.en.html

APT::NeverAutoRemove::KernelCount — Keep a custom amount of kernels
when autoremoving and defaults to 2, meaning two kernels are kept.
Apt will always keep the running kernel and the latest one. If the
latest kernel is the same as the running kernel, the second latest
kernel is kept. Because of this, any value lower than 2 will be
ignored. If you want only the latest kernel, you should set
APT::Protect-Kernels to false.

The checkbox for marking/unmarking will be disabled for kernels that
fall under the rule.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant