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
?
3 Answers
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
-
4I think reconfiguring all packages is not such a good idea and takes hours of manual work– rubo77Feb 24, 2014 at 11:51
-
-
-
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/…– rubo77Feb 24, 2014 at 12:04 -
2Is it possible that you meant
dpkg --configure -a
? That's a subset of whatapt-get -f …
does if there are unconfigured packages.dpkg-reconfigure
is an entirely different operation. May 26, 2018 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.
I had the same issue and in my case a Deb package was corrupted. I had to
delete the cached packages from
/var/cache/apt/archives
withsudo apt-get clean
before running
sudo apt-get -f install
dpkg lock
error, see here.sudo dpkg --configure some-package
and you encounter that SOME process is using SOME filesudo lsof /path/to/file
can give you PIDs of the processes tokill PID