Skip to main content
2 of 5
edited tags
terdon
  • 252.7k
  • 69
  • 481
  • 719

how to recreate /var/lib/dpkg/status

I have deleted some files around /var/lib/dpkg/, namely:

/var/lib/dpkg/status /var/lib/dpkg/available /var/lib/dpkg/info/* 

I understand Debian uses these files to keep some information about installed packages. Now when I do apt-get update, I get following error:

Reading package lists... Error! E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory) E: The package lists or status file could not be parsed or opened. 

As I understand the FHS, files located in /var are not supposed to be system-critical. Rater these should be temporary files, logs, caches, and similar.

Is there therefore a way to recreate the deleted files ?

Martin Vegter
  • 848
  • 81
  • 257
  • 449