Unable to parse package file

Asked by Rik on 2012-09-02

'E:Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages (1), E:The package lists or status file could not be parsed or opened.'
I'm using Ubuntu 12.04 I expected to update the software and discovered this bug.
I'm new to Ubuntu this is my first bug report and I hope I have completed this report correctly. If any further info is needed I will try to supply it.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2012-09-02
Last query:
2012-09-02
Last reply:
2012-09-02

This question was originally filed as bug #1044863.

Rik (rufn) said : #1

I'm not sure what to do now to fix this bug, any help would be great thank you.

sudo fuser -vvv /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
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 rm /var/cache/apt/*.bin
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 --purge autoremove
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get --fix-missing install
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade

Rik (rufn) said : #3

Thanks actionparsnip, that solved my question.