Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When 'Update Manager' starts running, it tells me that I need to do a 'Partial Upgrade', when I start doing the upgrade, it tells me

"Remove package in bad state

The package 'linux-headers-3.0.0-19' is in an inconsistent state and needs to be reinstalled, but no archive can be found for it. Do you want to remove this package now to continue?"

When I click 'Yes' the program just closes. I have tried to go into the software center and reinstall the 'linux-headers-3.0.0-19' ubuntu software center just freezes.

Right now I cannot run 'Synaptic', or remove any software.

Please help!

share|improve this question
    
Have you tried the sudo command of "sudo apt-get --purge remove <package>" and then try re-installing from the CLI? –  daslinkard Apr 17 '12 at 1:52
    
I tried it, the command sent back this response: "E: The package linux-headers-3.0.0-19 needs to be reinstalled, but I can't find an archive for it." –  GothicMonster Apr 17 '12 at 1:56
    
Did you try sudo apt-get install -f <package> ? –  Jeff Welling Apr 17 '12 at 2:00
    
I got the same message "E: The package linux-headers-3.0.0-19 needs to be reinstalled, but I can't find an archive for it." –  GothicMonster Apr 17 '12 at 2:01
    
Try the solution from this guy... askubuntu.com/questions/122699/… –  Lie Aug 2 at 20:13

2 Answers 2

Try this, I hope it works:

  1. Make a backup of /var/lib/dpkg/status:

    sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.bkup

  2. Open /var/lib/dpkg/status:

    sudo nano /var/lib/dpkg/status

  3. Search through the file for any reference to that package name (i.e. linux-headers-3.0.0-19) and CAREFULLY delete that entry. Don't delete anything else. Save the file and quite.

  4. Do sudo apt-get update.

This should probably solve the problem.

share|improve this answer
    
It works! I got Software Center couldn't be open when installing openfire and your solution works! –  Emerald214 Dec 17 '12 at 9:11
    
gedit did not to open /var/lib/dpkg/status because of some special characters. Instead, editing it with nano worked fine. Already on two occasions it solved a nagging problem with the libreoffice-base package for me. –  Gin Gordon Aug 17 at 16:07

If you get nowhere with any of the other offerings I've used this in the past

dpkg --remove --force-remove-reinstreq

From the dpkg manual

remove-reinstreq: Remove a package, even if it's broken

sudo dpkg --remove --force-remove-reinstreq  linux-headers-3.0.0-19
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.