Using zypper search
, I can find the package. I know that I could use
rpm -qlp <package.rpm>
to list the files, but I don't have it; since it is in one of the zypper
repositories. Is there something like this?
zypper list-files-in <package>
NOTE : I am creating a self-answered Q&A for other people trying to solve the same problem
6, “Managing Repositories with Zypper” for details on repository management. The default download directory is /var/cache/zypper/source-download . You can change it using the --directory option.
What is difference between RPM and zypper? RPM is useful for installing/uninstalling a single software package. With zypper, you can install/uninstall packages, patterns, products and patches. You can also manage your repositories with zypper.
There does not seem to be an option in zypper
to do this in one command, but you could:
Fetch the files without installing (Note: if this command threatens you to uninstall packages that is not a problem; with the --download-only
flag zypper
will stop after downloading)
zypper in --download-only <package>
Find the file:
find /var/cache/zypp -iname "package*rpm"
List the files in an uninstalled package:
rpm -qlp /var/cache/zypp/packages/<repo_alias>/suse/<arch>/<package-file-name>
Now you can clean up the files you downloaded (and some other cache) if you want:
zypper clean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With