4

How do I update (not install) an package pmc-rpm from repository myRepo to version 10.3.3-1 (but not to the last one!) in SUSE 10.1 command line (zypper)?

So I update the package normally, but this time I have to install the pre-previous package and after that the next and the next and then the last one.

zypper update -t package pmc-rpm
user72394
  • 101
  • 1
  • 1
  • 6
  • Are you sure those packages are still in the repository? I don't know from SuSE but I know that many (if not most or all) RH/CentOS/etc. mirrors don't keep older RPMs around that way. – Etan Reisner Sep 23 '14 at 14:25
  • Yes, I'm sure. It's may own repository. I can see my packages with command # zypper pa -ir own-repo – user72394 Sep 24 '14 at 06:50
  • Is the question here how (or can) you specify a specific version of a package to upgrade to? Is the question how to use the `upgrade` sub-command to do this? Something else? – Etan Reisner Sep 24 '14 at 11:25
  • The question is how can I upgrade the package to specific version like in zypper install package=10.3.3-1 ? – user72394 Sep 24 '14 at 11:48
  • Why can you not just use `install` for this? The documentation seemed to indicate that `install` will update a package just fine. Does that not work? Does `update` do work that `install` does not? From a quick read of the documentation it looked, to me, like `update` was inferior to `install` in a number of ways. – Etan Reisner Sep 24 '14 at 11:51
  • Are you sure? I should update the production servers. – user72394 Sep 24 '14 at 16:01
  • No. I'm not sure. I don't use SuSE. All I have to go on is the documentation I was reading. But that documentation seemed to indicate that they didn't really differ in most ways and that update has restrictions and limitations that aren't listed for install. For the record I was looking at https://en.opensuse.org/SDB:Zypper_manual_%28plain%29 . – Etan Reisner Sep 24 '14 at 19:10
  • With newer versions of zypper under OpenSuse 42.3 do this: https://stackoverflow.com/questions/25995813/zypper-update-package-to-the-previous-version-not-the-last – VonAxt Nov 02 '17 at 19:58

2 Answers2

4

So, for package update you can use also install parameter.

  1. List all package in your repository

    zypper pa -ir repository

  2. Then choose the version you need

    zypper in pmc-rpm=10.1.3-1

Thank you folks!

user72394
  • 101
  • 1
  • 1
  • 6
0

With newer version of zypper you can do:

zypper pa -ir repo-name
zypper install --oldpackage package-name-x.x.x.x-x.x86_64

E.g. with Skypeforlinux:

zypper pa -ir skype-stable
zypper install --oldpackage skypeforlinux-5.5.0.1-1.x86_64
VonAxt
  • 95
  • 9