kernels: Allow marking/unmarking kernels to be kept or autoremoved.#1048
Open
kernels: Allow marking/unmarking kernels to be kept or autoremoved.#1048
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.