Differnce between zypper up and zypper dup

Hi All,

Can anyone please explain the difference between the updates obtained by the zypper up method versus zypper dup for Tumbleweed.

Since this is a rolling release, I thought zypper up would keep it up to date. However, this has just given me 9 updates, so I still have release 20160417, with kernel 4.5.0-3-default. The zypper dup command brought 94 packages, including kernel 4.5.2-2-g0454abe-default, and the version number remained unchanged at 20160417.

I assume this means that the dup method gets packages that are less well tested than those brought by zypper up?

Is it safe to use zypper dup, or is it more likely to wreck the system?

Thanks for your patience.

The basic difference is that “zypper up” will not do an update that requires vendor change (this is usually related to switching repos). And “zypper up” will only update. It normally won’t remove a package that is no longer in the distribution (no longer in any repo).

Most of the time, what they do is similar. But occasionally there’s a major change to a software package that needs to remove some older packages to install new packages with different names. In that case, only “zypper dup” will work.

I will describe what I am doing, and let you decide what you should do.

I have only:

  • the standard repos put there by install;
  • the packman repo
  • the libdvdcss repo.

Note that the repo referring to the install media (I used a USB) is disabled.

I changed the priority of the packman repo to 98 (instead of the default 99). That gives the packman repo a preference over the others. If a package is in both the standard repo and packman, the packman version is normally used (but it doesn’t always work out that way – see below).

My normal practice is to use “zypper dup”.
Occasionally, that gives some conflict errors that I’m not sure about. So I abort that (say “no” at the “continue” prompt) and instead use “zypper up”. That avoids the conflict by not updating everything. Usually, the problem goes away by the next update. Or somebody will post about it on the factory mailing list.

I do occasionally see packages moving from “packman” to the opensuse repos, in spite of that priority difference. I think that happens when there would otherwise be a conflict, and “zypper dup” chooses to switch repos to resolve the problem. If I had used “zypper up” that would have left some packages not updated.

I also occasionally look for orphaned packages. You can get to those with Yast Software Management, and the “Package groups” view. I will delete orphaned packages if I know that won’t cause a problem. That keeps my system close to what a fresh install would provide.

This has mostly been working for me.

Some folk have added additional repos for other software. I don’t really have experience with doing that on Tumbleweed (not counting “krypton” which is a special case). My understanding is that the best advice in that case is to use “zypper up”. But it is probably then a good idea to follow that with “zypper dup -D”. That latter command will tell you what “zypper dup” would change, and you can use that as a guide on whether to manually make a few changes.

I hope that helps. Ask further questions if you are still unsure what to do.

Thank you for that detailed explanation, it really helps me a lot. The only thing I do not understand is the kernel upgrade I mentioned (4.5.0-3 > 4.5.2-2), done by “zypper dup” but not “zypper up”. Or does that mean a Vendor change?

I have not seen that update. But then I have not tried updating in the last few days, as there did not appear to be a new snapshot available. So maybe there’s an unexpected kernel waiting for me.

Or have you added a kernel repo?

Dup brings in the highest ver number no matter what repo and makes a version change if the repo changes

Thanks to you both.

To nrickert: I thought I was using only the standard repos plus Packman, but I just checked and found that the kernel-update repo is listed and enabled in YaST. I certainly did not add it myself. Is it possible that “zypper dup” added it? If it was there before, “zypper up” should have found it. The snapshot number has not changed.

To gogalthorp: if I understand correctly, the new kernel is in the kernel-update repo (else “zypper up” would have found it)?

To both: should I disable the kernel-update repo, and should I revert to the older kernel?

neither zypper dup or up add repos. You have to added or perhaps a oneclick did

I agree with gogalthorp, that zypper did not add the repo unless told to. The “one click” might be a good hint at what happened.

Yes, I would suggest that you disable that repo. You can occasionally enable for checking if interested, and then disable again.

That kernel probably won’t do any harm, but it might block kernel updates from the Tumbleweed repo. So I would suggest removing it (reverting), but there isn’t a great urgency to do that.

Thanks again to both. I will accept your good advice and revert, also disable the repo.

Additionally “zypper dup” will remove packages that are explicitly marked for removal; there is a list of obsolete packages that is maintained for each distribution.

Also in Tumbleweed (and may be Leap, not sure) zypper dup can be configured to not allow vendor change. In this case primary difference between “up” and “dup” will be mentioned obsolete packages removal.