zypper list files in non-installed package
Asked Answered
E

1

7

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

Estienne answered 7/8, 2019 at 15:24 Comment(0)
E
7

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
Estienne answered 7/8, 2019 at 15:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.