When I open software from menu, it says "cannot open software database. Please reinstall the software-center package. When I write software-center on terminal, such error comes:

2014-05-28 09:11:20,584 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2014-05-28 09:11:20,593 - softwarecenter.ui.gtk3.app - ERROR - xapian open failed
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 302, in __init__
if self.db.schema_version() != DB_SCHEMA_VERSION:
File "/usr/share/software-center/softwarecenter/db/database.py", line 289, in schema_version
return self.xapiandb.get_metadata("db-schema-version")
File "/usr/share/software-center/softwarecenter/db/database.py", line 177, in xapiandb
self._db_per_thread[thread_name] = self._get_new_xapiandb()
File "/usr/share/software-center/softwarecenter/db/database.py", line 190, in _get_new_xapiandb
xapiandb = xapian.Database(self._db_pathname)
File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 3667, in __init__
DatabaseCorruptError: /var/cache/software-center/xapian/iamchert: Chert version file should be 28 bytes, actually 0

Now, when I write command sudo apt-get remove software-center

dpkg: error: corrupt info database format file '/var/lib/dpkg/info/format'
E: Sub-process /usr/bin/dpkg returned an error code (2)

I had ubuntu before but it kind of got corrupted. Now, I have freshly reinstalled it and even at start, software center is not opening and this error comes. I hope you have a solution. Thanks.

2 Answers 2


The cache files are corrupted. To regenerate it open a terminal and enter the following:

sudo rm -r /var/cache/software-center/xapian
sudo mv /var/lib/dpkg/info/format /var/lib/dpkg/info/format.bak
sudo dpkg --clear-avail
sudo apt-get update
sudo apt-get install --reinstall software-center

Press CTRL+ALT+T simultaneously to enter terminal.

To uninstall Software Center:

  1. sudo apt-get remove software-center

  2. sudo apt-get autoremove software-center

To re-install Software Center:

  1. sudo apt-get update

  2. sudo apt-get install software-center -y

  • I mentioned the error faced when i try to uninstall software center in the question posted
    – Newbie
    May 28, 2014 at 9:57
  • Try to re-install it, what does it then?
    – Korkel
    May 28, 2014 at 9:58
  • software-center is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.
    – Newbie
    May 28, 2014 at 9:59
  • Does sudo apt-get autoremove software-center work?
    – Korkel
    May 28, 2014 at 10:00
  • No, it gives the same error
    – Newbie
    May 28, 2014 at 10:03

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