How can I download a rpm to a local repository?
Solution 1
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*'
Solution 2
zypper -f install
should do a reinstall.
Try that "-f" in your command.
Related videos on Youtube
Fearghal
Updated on September 18, 2022Comments
-
Fearghal over 1 year
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.
-
Fearghal over 9 yearsWhat about the req to install a specific rev of package?