I was running aptitude and previewing packages marked to be updated when the power went out for a second. Now almost all of my installed packages are marked as obsolete and the updates I was about to install aren't found anymore. Updating the package list doesn't have any effect.

I assume I need to delete some file in the apt cache so that the package lists are downloaded anew. Is this assumption right? If yes, which file would I need to get rid of? If no, what do I need to do instead to repair my dpkg/apt?


Deleting the contents of /var/lib/apt/lists/ and updating the apt package lists via

cd /var/lib/apt/lists
sudo rm -rv ./*
sudo apt update

fixed the problem.

  • For future reference you just need to run apt-get update, nothing more, it will re-download all the archive indexes and process them. Also if you are doing a lot of work as root, you can become root by simply running sudo su - and then exit at the end of your admin session. To resume the install apt-get -f install will finish any broken or partial installs that were interrupted. – HostFission Aug 24 '17 at 5:26
  • @HostFission No, I tried that first and that didn't help in any way. Look in the original question: "Updating the package list doesn't have any effect." – Thomas Bartscher Nov 11 '17 at 14:30
  • @ThomasBartscher Then your apt install itself is broken, apt-get update replaces those files, just take a look at the source. – Geoffrey Nov 12 '17 at 15:11
  • Hm, yes, that does seem like something that might happen when apt is disrupted in the middle of updating. – Thomas Bartscher Nov 12 '17 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.