How do I rebuild a corrupt dpkg status file?

Posted by Ramón on Ask Ubuntu See other posts from Ask Ubuntu or by Ramón
Published on 2010-09-27T21:08:59Z Indexed on 2011/01/30 7:32 UTC
Read the original article Hit count: 414

Filed under:
|

Whenever I type sudo apt-get remove and then press the Tab key for auto-completion I get the following message:

grep-status: /var/lib/dpkg/status:15945: expected a colon
.

I don't see anything especially strange at line 15945 in the status file. It's a dot character in the description field of a mono library package and inserting a colon did not help. Removing the line containing the dot did not work either. Overwriting the file with status-old resulted in the same message.

Is there some way to rebuild the status file?

© Ask Ubuntu or respective owner

Related posts about bash

Related posts about dpkg