Server Fault is a question and answer site for system and network administrators. 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

Was doing a package update and it ended a process and hung so I rebooted the server and now it will not allow me to perform any more updates.

I tried the following to no avail:

sudo apt-get clean
sudo apt-get install -f  (I get a message: E: DPKG was interrupted, you must manually run sudo dpkg --configure -a to correct the problem)
sudo dpkg --configure -a  (I get the following - which is where it got stuck the first time)
'Setting up citadel-server (8.03- 1)'
'sendcommand: started (pid=1692) running in 504'
'Attaching to server...'
'domain Citadel server ready'
'Authentication as an internal program.'
'231 Shutting down server. Goodbye.'
sendcommand: processing ended.'

Then it all freezes and does nothing. It looks like a orphaned processes and it locks the dpkg and the citadel-server and so my mail no longer works. forcing me to reboot the server to get it back to work.

How do I fix the index so I can do future updates? Snaptic package also will not work.

Thank you

share|improve this question
You probably ought to go back and mark answers to your past questions as "accepted". – EEAA Dec 12 '11 at 5:16
How do I accept previous answers? Thank you, I will do it as soon as I figure it out. – Ubuntu User Dec 12 '11 at 5:28
Click the "check mark" to the left of your accepted answer. – EEAA Dec 12 '11 at 13:55
up vote 0 down vote accepted

In /var/lib/dpkg/info each package keeps some scripts:


To complete package installation process, .preinst and .postinst scripts should be run for each unpacked package. If those scripts finish with errors, dpkg interrupts. Find that scripts for citadel-server package and investigate why they don't work. Or just replase them with empty scripts with success exit status, run dpkg --configure -a and remove citadel-server.

share|improve this answer
This does not seem to be working. First of all there is no .preinst Also is there a way I can just remove the package and what would happen if I just deleted the citadel-server.files? – Ubuntu User Dec 23 '11 at 2:22
Some of this scripts may not exist for package, that's ok. No .preinst means that package doesn't need any pre-installation work. Uninstalling package manualy is not good idea until you have excellent knowledge of dpkg internals. What did you do that it doesn't work? Did you replace .prerm and .postrm with #!/bin/sh exit 0 and run dpkg-configure -a; apt-get install -f? – Selivanov Pavel Dec 23 '11 at 2:37
No I did not try that. When I look at all of the files under /var/lib/dpkg/info I am finding that acpid.prerm and .preinst .postrm .postinst to be the last changed sheel scripts. The Citadel-Server files show up with 2 day earlier dates of Dec 6. Also there is a citadel-server.conffiles – Ubuntu User Dec 23 '11 at 2:59
Also there is at the end of .prerm file 'exit 0' but there is a lot of script between it. You want me to delete all of the scripts between the #!/bin/sh and exit o? – Ubuntu User Dec 23 '11 at 3:02
Ok, I removed all of the script an ran the dpkg --configure -a and it is now fixed. I reran the update manager and there were several packages it reinstalled, including php5, etc. All good now. Thanks – Ubuntu User Dec 23 '11 at 3:44

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.