sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update
sudo apt-get dist-upgrade
Now I was facing a GPG error. To solve this I tried the following
$ sudo -i # apt-get clean # cd /var/lib/apt # mv lists lists.old # mkdir -p lists/partial # apt-get clean # apt-get update # exit
After this command. I entered the final commands.
sudo apt-get dist-upgrade