Thursday, December 27, 2012

openSUSE: The following package update will NOT be installed

zypper complains: "The following package updates will NOT be installed:" -- what to do?

There are at least two common-use scenarios in which this problem can crop up:

Scenario One

  • you have enabled a repository from a different vendor (typically, the Packman repository but could be any repo from a different vendor) and
  • you have a package installed from the main openSUSE repository which is duplicated in the other vendor's repository, and the other vendor's package has a newer version.

Instead of just replacing the openSUSE package with the one from Packman, zypper complains. Now, the first thing to note is that this issue (i.e. vendor change) is explained in general terms in the openSUSE Support Database:

(As /etc/zypp/zypp.conf puts it: "Per default the solver will not replace packages of different vendors, unless you explicitly ask to do so." Read that file for more information on this topic.)

Before taking any action, one should carefully assess the situation. The first thing to find out is which repository ("vendor") is offering which version of which package. Here is one way to find that information: After zypper displays its summary of the update (with the vendor change warnings) it asks if you want to continue. Instead of pressing 'y' or 'n', press '?' for a list of additional options:
y - Yes, accept the summary and proceed with installation/removal of
n - No, cancel the operation.
v - Toggle display of package versions.
a - Toggle display of package architectures.
r - Toggle display of repositories from which the packages will be
m - Toggle display of package vendor names.
d - Toggle between showing all details and as few details as possible.
g - View the summary in pager.

However, if zypper isn't asking to continue, you may not have that option. Another way to get it to display vendor information is to use the -vv parameter like so:
# zypper -vv up

You now have a better idea of what is going on. Since changing the vendor of a package carelessly can mess up the system, you should look at each package individually. Only change vendor when you have a real reason to do it. Do not change vendors on packages merely to get rid of these warnings.

If you're wondering how to make zypper install the newer version (and change vendor) of a given package, here's the command:
# zypper install --from [repo] [package]

Scenario Two

You have some packages installed on your system from Repository X. Then you remove Repository X, either by removing the .repo file in /etc/zypp/repos.d or by running zypper rr. The installed packages from that repository remain in the system, but are "orphaned", so to speak, and will not be updated even if a different repository is later activated that contains newer versions of these packages. To get rid of the message in this case, you have to (manually):
  1. remove the offending packages
  2. reinstall them

It follows that it's a good idea to keep an eye on your system and make sure you're not installing tons of packages from an unsupported repo.


  1. > The following package update will NOT be installed

    It' not a problem, it's just notification.

  2. Yes, this is not a problem... but there is an issue, kinda. It's a warning that your repo's will need some clean-up before you try and do something like a zypper dup (which I'm contemplating, e.g. to go from 12.3 -> 13.1)

    I have quite a few packages listed, and they're all from me flitting between the core repos and OBS... so at least I now understand what zypper's trying to tell me, and have a bit of a handle on how I will resolve before I attempt a dup, so thanks :-)