How can I fix this?

Asked by brodanny

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_natty-security_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

Try:

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*; sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists; sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo apt-get clean; LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get update
sudo dpkg --clear-avail; sudo dpkg --configure -a
LANG=C;sudo apt-get install -f
LANG=C;sudo apt-get update
LANG=C;sudo apt-get dist-upgrade

Revision history for this message
brodanny (brodanny) said :
#2

Thanks actionparsnip, that solved my question.

Revision history for this message
IgorKueng (igorkasa) said :
#3

Still actual :)
Thanks!