You might be encountered with this error while updating Ubuntu. I found the solution for this error in Launch Pad questions and thought I’ll make a post of it for others who will search for the right solution. The solution is to issue a list of commands using terminal(Ctrl+Alt+T)
The commands are:
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
Once all this commands are executed, you will be able to run the update manager as usual. There is one more single command which will be another option. The command is:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
As always, Ubuntu forum is the best option to search for any solution








