i accidentally deleted the file /var/lib/dpkg/available

Asked by kenyon C

i was in the terminal and accidentally pressed...(rm /var/lib/dpkg/available)...now i cant run the the terminal (sudo dpkg --configure -a). when i do run it ..it says(dpkg: failed to open package info file `/var/lib/dpkg/available' for reading: No such file or directory
) ..how do i getthe file back???...can i get it back???

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
kenyon C
Solved:
Last query:
Last reply:
Revision history for this message
Ian Ace (iaculallad) said :
#1

Lets just hope that the file available-old is still available in the directory. Perform the command below:

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

sudo dpkg --configure -a

HTH.

Regards,
Ian

Revision history for this message
kenyon C (ladysman29234) said :
#2

dude thank you soooo much your such a life saver :)

Revision history for this message
isa (aku-kendo) said :
#4

Thanks Ian Ace, it solves my problem. It works

Revision history for this message
Vinayak (vinayakvp6) said :
#5

I think there is no old file in my system, so how should I proceed if want to reinstall?