How to see files installed by a package

If you’ve ever downloaded a package on Debian (or any of its derivatives) and want to see which files were installed, it’s easily accomplished using the ‘dpkg-query’ command:

$ dpkg-query -L vsftpd
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/vsftpd
/usr/share/doc/vsftpd/FAQ.gz
/usr/share/doc/vsftpd/examples


/usr/share/doc/vsftpd/changelog.Debian.gz
/usr/share/doc/vsftpd/REWARD
/usr/share/doc/vsftpd/SPEED
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/vsftpd.8.gz
/usr/share/man/man5
/usr/share/man/man5/vsftpd.conf.5.gz
/usr/sbin
/usr/sbin/vsftpd
/etc
/etc/init.d
/etc/pam.d
/etc/pam.d/vsftpd
/etc/init
/etc/init/vsftpd.conf
/etc/vsftpd.conf
/etc/logrotate.d
/etc/logrotate.d/vsftpd
/etc/ftpusers
/etc/init.d/vsftpd

The above example is for the ‘vsftpd’ package, but this equally applies to all of the other packages installed using dpkg/apt.

In case you’re on a system which uses yum (Fedora, RedHat, CentOS etc…) you can use ‘rpm -ql [package name]’:

# rpm -ql yum-cron
/etc/cron.daily/0yum.cron
/etc/rc.d/init.d/yum-cron
/etc/sysconfig/yum-cron
/etc/yum/yum-daily.yum
/etc/yum/yum-weekly.yum
/usr/share/doc/yum-cron-3.2.29
/usr/share/doc/yum-cron-3.2.29/COPYING

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.