The Linux Page

Error trying to upgrade software on an Ubuntu system

Today I got a really strange error. Part of the message was:

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/<some name>
E: The package lists or status file could not be parsed or opened.

That seemed really bizarre. I had never seen such an error before...

So I searched for it and one thing to know is that the files under that directory are temporary, so you can actually delete them. apt-get knows how to regenerate them.

So in other words you can do something like this:

sudo rm /var/lib/apt/lists/<some file>
# or even:
sudo rm /var/lib/apt/lists/*

But apt-get update still did not work for me after all of that.

The fact is that it could not write the data because the disk was actually full. Looking into it, I found out that one of the log files of the computer was growing too quickly and blocked everything else...

Things came back to life once the firewall was updated and the file deleted.