23

Whenever I run aptitude safe-upgrade, I get this output:

The following partially installed packages will be configured:
  cups gconf2 ufw update-manager 
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

How can I configure the four mentioned packages?

I tried dpkg-reconfigure gconf2 but that fails with

/usr/sbin/dpkg-reconfigure: gconf2 is broken or not fully installed

3 Answers3

38

Run these codes

sudo apt-get update

sudo apt-get clean

sudo apt-get autoremove

sudo apt-get update && sudo apt-get upgrade

sudo dpkg --configure -a

sudo apt-get install -f

This will clean and configure your packages

Ringtail
  • 16,127
  • Might be useful to some. During autoremove I got one additional error: E: Could not perform immediate configuration on SOMEPACKAGE. That was resolved by apt-get install -o APT::Immediate-Configure=false -f apt SOMEPACKAGE – dnsmkl Mar 03 '15 at 19:50
  • for me in a similar situation apt-get autoremove does not work and results in many errors c.f.: http://pastebin.com/SgM46XE6 how can I get a work around? – Rene Pickhardt Nov 27 '16 at 12:54
  • 1
    Also, it might be useful to run sudo apt-get --fix-broken install. – galath Jul 15 '17 at 01:08
5

This command fixed my problem:

apt-get --purge remove program_name

But of course you need to try also @ringtail answer.

ipeacocks
  • 660
  • 3
    NOTE: purge means all your settings and possibly some of your data for that application will be removed. So if you care about those please be careful with this. – Mr. Developerdude Apr 17 '18 at 21:59
  • In fact, it was precisely the problem that old (no longer working) settings were lying around for me and I needed the updated ones from the latest package. I was upgrading from Ubuntu 14 to 18 and had not modified the settings. So this worked for me. – Jason Dec 16 '19 at 15:15
3

The answer above did not work for me. I had to run dpkg with the force-depends option, to resolve a circular dependency between some kernels.

sudo dpkg --force-depends --configure -a

This turns all dependency problems into warnings. Use with caution, with minimal scope (install everything that does not have any problems first) and at own risk.

Paul Weber
  • 139
  • 4
  • 2
    Better yet, do not use at all. It is never, ever necessary. And if you ever think you need to use it, no, you don't. Ask a question and someone who knows what they are doing will help you solve your dependency issues. – fkraiem Sep 05 '18 at 08:38
  • Well, it solved my issues and I was able to successfully install the new kernel on my system. Though I first installed everything that let itself configure and then forced the solution of a circular dependency problem with that ... Though, you are right - in the hand of a unsuspecting user this command can really wreck havoc ... – Paul Weber Sep 07 '18 at 05:04
  • @fkraiem, I have an issue that is making me think I might need it. Would you care to opine?

    https://unix.stackexchange.com/questions/659717/broken-ubuntu-trying-to-remove-libc-bin

    – MadPhysicist Jul 24 '21 at 08:55