purge kernels with an invalid state

Bug #1853757 reported by Doug Smythies
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-purge
Invalid
Undecided
Unassigned

Bug Description

Due to a stupid, and actually not needed, dependency, Mainline kernels no longer install completely on a 16.04 server. I don't care, because all I wanted was the Ubuntu kernel configuration anyhow, which I am able to get. When one tries to use linux-purge to get rid of it, the program errors out:

doug@s15:~/temp-git-linux-purge/linux-purge$ sudo ./linux-purge -c
[linux-purge] ERROR: The following kernel packages have invalid state; each
package name is followed by its state:
linux-headers-5.4.0-050400rc8-lowlatency install ok unpacked

(Refer to the documentation of dpkg for explanation of the package states.)

Hint: Run this command with --fix option.
Hint: If a package flag is 'reinst-required' (instead of 'ok') for some
package, you may have to reinstall the package by 'apt-get install --reinstall'.

It would be nice to be able to deal with kernels in such a state.

description: updated
Revision history for this message
Jarno Suni (jarnos) wrote :

So did you try the --fix mode?

As a quick workaround I think you could purge linux-headers-5.4.0-050400rc8-lowlatency manually by apt and then use linux-purge to purge the rest associated packages.

I have required linux packages to be completely installed in normal purging mode to keep things simple and clear for the script and user.

Revision history for this message
Doug Smythies (dsmythies) wrote :

Due to the insane, unnecessary, version dependency on something else, it is not fixable.

And yes, I just purge them manually using dpkg.

Re: Simple and clear: Fair enough.

Revision history for this message
Doug Smythies (dsmythies) wrote :

Correction: using the --fix option works great. A subsequent run then allows purging of the rest of that kernel.

Changed in linux-purge:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.