How to list files in a package?
This page explains how to list files from a package in the different distributions I have used.
Debian based
dpkg
user $ dpkg -L curl
/.
/usr
/usr/bin
/usr/bin/curl
/usr/share
/usr/share/doc
/usr/share/doc/curl
/usr/share/doc/curl/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/curl.1.gz
/usr/share/zsh
/usr/share/zsh/vendor-completions
/usr/share/zsh/vendor-completions/_curl
/usr/share/doc/curl/NEWS.Debian.gz
/usr/share/doc/curl/changelog.Debian.gz
RedHat based
dnf
user $ dnf repoquery -l crontabs
[...]
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/etc/sysconfig/run-parts
/usr/bin/run-parts
/usr/share/licenses/crontabs
/usr/share/licenses/crontabs/COPYING
/usr/share/man/man4/crontabs.4.gz
/usr/share/man/man4/run-parts.4.gz
rpm
user $ rpm -ql crontabs
[...]
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/etc/sysconfig/run-parts
/usr/bin/run-parts
/usr/share/licenses/crontabs
/usr/share/licenses/crontabs/COPYING
/usr/share/man/man4/crontabs.4.gz
/usr/share/man/man4/run-parts.4.gz
Another useful option is used to use -p to list .rpm package files before installing it.
user $ rpm -qlp telnet-server-1.2-137.1.i586.rpm