Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Everytime I sudo apt-get update it always not complete and will say in the end

E: Read error - read (5: Input/output error)
E: The package lists or status file could not be parsed or opened.

Same goes, when I try to install something and do sudo apt-get install <some app>

What should I do ? I admit, that my drive has bad sectors, could that be the reason? Is there anything else I can do?

share|improve this question
    
I am experiencing the same problem,even though i followed solution provided by Avinash Raj the error recurrs. is there any other way to approach this problem. thanks in advace – saikumarm May 9 '14 at 12:06
    
    
Could it be HDD problems? I have been having the same problems and my file system kept on falling back to a read-only system. – Dennis M. Mwebia Jun 29 '15 at 7:57
up vote 19 down vote accepted

Try using an older status file,

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status.bad
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo apt-get update
share|improve this answer
1  
thank you 2x Avinash :) .. that really saves me.. All along it was just the status file is my problem? – Teody C. Seguin Jan 24 '14 at 13:58
1  
The problem persists even after doing the steps you told, may be my status-old is also corrupt. – Prabhu Aug 24 '14 at 8:35
    
the try the one within the backup directory /var/backups/dpkg.status.0 – Avinash Raj Aug 24 '14 at 8:39
    
In my case, this did not work. I removed /var/lib/dpkg/status and just created an empty one with touch /var/lib/dpkg/status and that fixed the problem. – hayavuk Sep 2 '14 at 16:43
1  
I had to do the following to solve this: sudo rm /var/lib/apt/lists/* -vf sudo apt-get update – jonnyflash Dec 30 '14 at 4:43

I was running into a similar error:

Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

I followed similar suggestions to copy status-old.

$ head /var/lib/dpkg/status
$ head /var/lib/dpkg/status-old

All of my status files were blank for some reason. Luckily, I found out there are backups of these files:

$ ls -l /var/backups/dpkg.status.*
-rw-r--r-- 1 root root 444620 Nov 15 06:33 /var/backups/dpkg.status.0
-rw-r--r-- 1 root root 444620 Nov 15 06:33 /var/backups/dpkg.status.1.gz
-rw-r--r-- 1 root root 128168 Sep 20  2013 /var/backups/dpkg.status.2.gz
-rw-r--r-- 1 root root 112545 Sep 16  2013 /var/backups/dpkg.status.3.gz
-rw-r--r-- 1 root root 107767 Sep 14  2013 /var/backups/dpkg.status.4.gz
-rw-r--r-- 1 root root 107766 Sep 11  2013 /var/backups/dpkg.status.5.gz
-rw-r--r-- 1 root root  94583 Sep 11  2013 /var/backups/dpkg.status.6.gz

I checked the latest backup...

$ head /var/backups/dpkg.status.0

...but it was still blank. So I unzipped an older one...

$ gunzip /var/backups/dpkg.status.1.gz
$ head /var/backups/dpkg.status.1

This time there was content. So I copied it...

$ cp /var/backups/dpkg.status.1 /var/lib/dpkg/status

Then apt-get update ran without problems.

Credit goes to this post.

share|improve this answer

This is old question, but just for archive purpose... the follow was what solve this problem in my case:

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update
share|improve this answer
1  
yes removing all the apt-get files and starting totally fresh was also what worked for me, it took some time but worked! tanx – azerafati May 14 at 14:28
1  
This worked for me after the 3 other options - copy old status / copy backup status / delete and create blank status - didn't work. I also realized how the problem occurred. I had tried changing servers during my last manual update (in June 2016), while the issue was actually with my ISP, which hung the operation couple of times. The lists folder had (possibly corrupted) lists from different Ubuntu servers, which got cleared and recreated after this operation. – Sri Jul 14 at 5:48

protected by Community May 15 at 16:07

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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