0

Somehow I have ended up with two versions of a program (puppet) on my system.

t@desk:~$ /usr/local/bin/puppet --version
4.10.1

t@desk:~$ /usr/bin/puppet --version
4.10.8

It looks to me like they are both managed with apt

t@desk:~$ apt show -a puppet
Package: puppet
Version: 3.8.5-2ubuntu0.1
...
Package: puppet
Version: 3.8.5-2
...

Looking at the puppet publish history on launchpad, it looks like 3.8.5-2 is the older one.

I would like to remove it, but apt can't find the package when removing:

t@desk:~$ sudo apt remove puppet=3.8.5-2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'puppet' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

...despite being able to list it:

t@desk:~$ sudo apt show -a puppet=3.8.5-2
Package: puppet
Version: 3.8.5-2
...

apt-get doesn't do much better:

t@desk:~$ sudo apt-get remove puppet=3.8.5-2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'puppet' is not installed, so not removed

t@desk:~$ sudo apt-get install puppet=3.8.5-2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 puppet : Depends: puppet-common (= 3.8.5-2)
E: Unable to correct problems, you have held broken packages.

Is apt really not finding the package or have I (somehow) created an unhandled error state?

Is my only remaining option to manually uninstall?

  • try sudo dpkg --configure -a, then sudo apt update and try again – George Udosen Oct 27 '17 at 18:42
  • dpkg -S /usr/local/bin/puppet will show you the package that owns /usr/local/bin/puppet. Same for dpkg -S /usr/bin/puppet – waltinator Oct 27 '17 at 18:47
  • 1
    You must use the exact package name that apt/dpkg will understand: 3.8.5-2ubuntu0.1 – user535733 Oct 27 '17 at 18:53

Your Answer

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

Browse other questions tagged or ask your own question.