List files installed by a package (RPM and APT based distributions)

RPM:

  1. Install yum-utils with:
    yum install yum-utils
  2. Make your query:
    repoquery --list *package_name*
  3. Sample:
    $ repoquery --list httpd 
    /etc/httpd
    /etc/httpd/conf
    /etc/httpd/conf.d
    /etc/httpd/conf.d/README
    /etc/httpd/conf.d/welcome.conf
    /etc/httpd/conf/httpd.conf
    …

APT

  1. Just type your query:
    dpkg -L *package_name*
  2. Sample:
    $ dpkg -L apache2
    /.
    /usr
    /usr/share
    /usr/share/bug
    /usr/share/bug/apache2
    /usr/share/bug/apache2/control
    …