1

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?

1 Answer 1

2

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.

4
  • 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. Commented Aug 24, 2017 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." Commented Nov 11, 2017 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
    Commented Nov 12, 2017 at 15:11
  • Hm, yes, that does seem like something that might happen when apt is disrupted in the middle of updating. Commented Nov 12, 2017 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .