I have a local repo that has some rpms in it. The repo xmls etc are up to date.

When I find an rpm I don't have, I want to be able to download it, not install it obviously, and put that rpm into the repo dir.

I see I can use zypper install --download-only <packagename> but this seems to only work when I haven't got the package installed on my box, else it says 'already' installed. It also doesn't allow me to state the version/edition/rev of the package I want.

This is no good to me.

How can I get a rpm from my active repositories and store it to a specified location? I don't mind installing a new tool if zypper aint the way to go.


zypper -f install should do a reinstall.

Try that "-f" in your command.

  • What about the req to install a specific rev of package? – Fearghal Jan 24 '15 at 23:24

Search the repositories and see the details (all versions and architectures, repositories) - example for python-base:

zypper search --details  python-base

Download the specified version of the RPM package without installing. Package can be already installed and it won't be changed.

zypper -v install -f --download-only 'python-base=2.6.0'

Find the downloaded RPM file:

find /var/cache/zypp/packages/ -name'python-base'
  • 1
    find parameter should be -name 'python-base*' – L.R. Dec 21 '16 at 15:19

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.