We cannot find the parameter for it in the man pages, but maybe there is a solution for it:

Question: How can we install packages before a given date? So not the up-to-date version of a package, but an older one that was issued before a given date.

Selecting them one-by-one by hand is too slow.

  • Can you paste sample output of a zypper command that provides the option of selecting an older version of a package? – Klaatu von Schlacker Jun 29 '15 at 21:56

I doubt you'll be able to install before a given date. I tried setting the system date backwards and that doesn't work. Nor is there an option you can pass to rpm which is what zypper uses underneath.

So the only approach I can think of is to set up a local RPM repository for SuSe, and fill that with those packages before a certain date and use that. To find out what was available at a certain date archive.org may be useful.

See this for how to set up a local OpenSuSE repository.

  • +1 I was going to write this up, but got sidetracked. Do you mind including instructions for setting up a local repository? – eyoung100 Jun 30 '15 at 4:18
  • I would, but I have never set up a local RPM repository for SuSE, so all I'd be doing is copying or paraphrasing the instructions given in the link with the possibility of adding noise to the instructions. – rocky Jun 30 '15 at 4:30
  • That was the point of me asking... You don't realize how many Google visitors we get coming from a dead link on "How To ... (install a local rpm)", so if we follow a link that isn't dead and paraphrase it before the link dies, readers will just have to look here... plus i can guarantee more upvotes, albeit slowly, as all the other links go dead. – eyoung100 Jun 30 '15 at 4:35
  • A couple of things. If this question were "How to set up a SuSE Remote Repository" then that would make a lot of sense. But it's a proposed solution to a different problem; right now we don't even know if it is the best solution. Yes, it sucks when links outside of SO go bad, but for a topic like this, information can also be stale and may change as SuSE does.. There are 3 alternatives I see here. Post another question (best idea) and answer that, and I'll link it here. Or someone with first-hand knowledge can add a comment to this or edit my answer. Or provide another answer. – rocky Jun 30 '15 at 5:12

zypper search -s --match-substrings may be the best search option you can have. However, it doesn't really search package build date in the RPM. I think what you try to do is pull/install all updates released before certain date.

What I did was manually pull packages, host them with a Repo. My repo is on a CentOS host. It was created with createrepo. In the zypper .repo file, specify "type=yum".


I assume that you want to install a specific version of package before the up-to-date one. For example with MozillaFirefox, when searching for MozillaFirefox packages with the following command:
zypper se -t package -s MozillaFirefox
The output will be (i586 packages and other not related one has been truncated):

v | MozillaFirefox | package | 38.0.1-30.1 | x86_64 | openSUSE-13.2-Update
v | MozillaFirefox | package | 37.0.2-27.1 | x86_64 | openSUSE-13.2-Update
v | MozillaFirefox | package | 37.0.1-23.1 | x86_64 | openSUSE-13.2-Update
v | MozillaFirefox | package | 36.0.4-18.1 | x86_64 | openSUSE-13.2-Update
v | MozillaFirefox | package | 36.0-14.2 | x86_64 | openSUSE-13.2-Update
v | MozillaFirefox | package | 35.0-9.1 | x86_64 | openSUSE-13.2-Update
v | MozillaFirefox | package | 34.0.5-5.4 | x86_64 | openSUSE-13.2-Update
i | MozillaFirefox | package | 33.0-2.1 | x86_64 | openSUSE-13.2-Oss
i | MozillaFirefox | package | 33.0-2.1 | x86_64 | openSU

As we can see, MozillaFirefox version 33.0-2.1 has been installed on this system and the latest one is 38.0.1-30.1.
If you wan do not want to install the latest version, and just want to install a version up to version 36.0 then all you have to do is call zypper in do it for you.
The syntax is:
zypper in 'Mozillafirefox.x86_64<36.0
You can also install the i586 architectural package
zypper in 'Mozillafirefox.i586<36.0
Or you can let zypper does selection package architecture for you
zypper in 'Mozillafirefox<36.0

Then zypper will install version 35.0-9.1 which is closest to version 36.0.
zypper also provides support for '>, <=, >=, etc'; you can see it with zypper help in.
Hope this is what you are looking for and hope this help.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.