In case there were some problems during the last apt-get operation, is there a command that checks if something has to be continued in apt-get?

  • 1
    If you get a dpkg lock error, see here. – Wilf Feb 24 '14 at 11:23
  • apt-get doesen't suggest anything here, but aptitude does, but a very strange suggestion on my laptop: askubuntu.com/questions/425516/… – rubo77 Feb 24 '14 at 11:59
  • Depends where it was interrupted. Sometimes you interrupt dpkg sometimes you interrupt apt-get. apt-get itself can be interrupted any time since it's just an frontend for dpkg, dpkg otherwise is not for some operations. – Braiam Feb 24 '14 at 16:04

Use the command:

sudo apt-get -f install

If that doesn't work, you can direct dpkg to finish setting up any packages that were only partially set up:

sudo dpkg --configure -a

If it doesn't work than you can reconfigure all the packages with:

sudo dpkg-reconfigure -a
| improve this answer | |
  • 4
    I think reconfiguring all packages is not such a good idea and takes hours of manual work – rubo77 Feb 24 '14 at 11:51
  • is it the same with sudo aptitude -f install? – rubo77 Feb 24 '14 at 11:52
  • @rubo77: no, it is not the same but something similar. – Frantique Feb 24 '14 at 12:02
  • On my problem the -f doesent make any difference, woth or without, I get no errors with apt-get but with atṕtitude, see: askubuntu.com/questions/425516/… – rubo77 Feb 24 '14 at 12:04
  • 1
    Is it possible that you meant dpkg --configure -a? That's a subset of what apt-get -f … does if there are unconfigured packages. dpkg-reconfigure is an entirely different operation. – David Foerster May 26 '18 at 16:22

In addition to the response by @Frantique, I would like to add:

sudo dpkg --configure -a

That solved my issue when the upgrade was interrupted during the process.

| improve this answer | |

I had the same issue and in my case a Deb package was corrupted. I had to

  1. delete the cached packages from /var/cache/apt/archives with

    sudo apt-get clean
  2. before running

    sudo apt-get -f install
| improve this answer | |

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.