-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options to purge packages removed during upgrade #345
Comments
I ran into something similar. I have
in my APT configuration and had expected Yet, I saw $ dpkg --get-selections | grep deinstall
linux-image-5.19.0-1025-aws deinstall
linux-modules-5.19.0-1025-aws deinstall
$ apt list '~c'
Listing... Done
linux-image-5.19.0-1025-aws/jammy-security,jammy-updates,now 5.19.0-1025.26~22.04.1 amd64 [residual-config]
linux-modules-5.19.0-1025-aws/jammy-security,jammy-updates,now 5.19.0-1025.26~22.04.1 amd64 [residual-config] I took a peek at the code and noticed that the Of course, it will not purge configuration files for already removed packages but only for packages removed after the fix. BTW, this issue is not specific to kernel packages. I could prepare a PR if interested. |
Purging configuration files for already removed packages can be achieved with one of sudo apt purge $(dpkg --get-selections | grep deinstall | cut -f1)
sudo apt purge '~c' |
I've been using the changes from the PR and am seeing Purging configuration files for $package ($version) ... messages in the So far so good, but I still end up with packages with what Purging configuration files for linux-modules-6.2.0-1010-aws (6.2.0-1010.10~22.04.1) ...
dpkg: warning: while removing linux-modules-6.2.0-1010-aws, directory '/lib/modules/6.2.0-1010-aws' not empty so not removed Checking that directory there were indeed files left. Checking Purging the corresponding However, I have also seen this happen with other packages not in any way Linux kernel related. Recent examples include Checking the Running |
The u-u script works great making upgrade delivery non a head ache. However due to frequent upgrades my machines keep lots of kernel packages in a
deinstall
state. I believe remove is used over purge to avoid removal of custom crafted configuration files. But I assume it's rarely a case for kernel upgrades.Anyway the proposal is add per-category option to use purge over remove, i.e.:
or introduce third-state for option string value:
The text was updated successfully, but these errors were encountered: