Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently updated an server from 8.04 to 10.04, the update ran basically flawlessly, but now every time i use apt-get I get strange error messages.

:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up gcj-4.4-jre-headless (4.4.3-1ubuntu4.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/rmid corrupt: invalid status
dpkg: error processing gcj-4.4-jre-headless (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I dont even use java on that machine. How can I get rid of it (apt-get remove or purge did not work).

Any ideas? Thanks for your help.

share|improve this question

Okay, I could not find a solution, so I simply removed (deleted) all the files beginning with gcj-4.4-jre-headless from the folder /var/lib/dpkg/info/ . I don't know if that was the best idea, but it worked. Good luck for everyone who reads this.

share|improve this answer

Your Answer


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.