Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was receiving an error earlier from a fresh install of the Ubuntu server. Normally I grab either ubuntu server or the mini install and go from there myself.

This time when I started trying to use packages using apt-get install or apt-get update I would get an error:

Reading package list... Error!
E: Read error - read ( 21: Is a directory )
E: The package lists or status file could not be parsed or opened.

I wasn't entirely sure what this meant so I searched around google and came up with a number of different solutions, some involving synaptic while others involved dpkg. I even started removing all of the 'unstable' repositories from /etc/sources/list.d leaving only a few behind.

Either way I got hasty and mad and deleted the /var/lib/dpkg/ contents and I didn't make a backup. (I'm running it on a virtual machine so it's not a big deal I could just reinstall but I'd rather understand the actual problem).

In the case that I completely screwed up dpkg and deleted essential files, is there any easy way to repair this?

share|improve this question

marked as duplicate by Braiam, Eric Carvalho, Warren Hill, Alaa Ali, qbi Sep 24 '13 at 21:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
askubuntu.com/questions/178025/… I found this post, I'll try this first and see how it goes. –  Bryan Abrams Sep 19 '13 at 8:16
    
Did you check this answer askubuntu.com/a/332934/169736 ? –  Braiam Sep 23 '13 at 13:36

Browse other questions tagged or ask your own question.