If, when you run a command like :
apt-file search apache2.conf
on your Ubuntu system and get nothing back this is likely because you don’t have the apt repository “Contents” files cached locally. To fix this run :
apt-file update
which will then attempt to download all of the “Contents-arch.gz” files (e.g. Contents-amd64.gz ) locally so that the next time you run apt-file search you’ll get a response like this :
user@hostname:~$ apt-file search apache2.conf
apache2.2-common: /etc/apache2/apache2.conf
apache2.2-common: /usr/share/doc/apache2.2-common/examples/apache2/apache2.conf.gz
dspam-webfrontend: /etc/dspam/dspam-apache2.conf
ebox-usersandgroups: /usr/share/ebox/stubs/usersandgroups/user-apache2.conf.mas
freeradius-dialupadmin: /etc/freeradius-dialupadmin/apache2.conf
libapache2-mod-jk: /usr/share/doc/libapache2-mod-jk/httpd_example_apache2.conf
liblemonldap-ng-manager-perl: /etc/lemonldap-ng/manager-apache2.conf
liblemonldap-ng-portal-perl: /etc/lemonldap-ng/portal-apache2.conf
mirmon: /usr/share/doc/mirmon/examples/mirror-apache2.conf
mumble-django: /etc/mumble-django/apache2.conf
nagios3-common: /usr/share/doc/nagios3-common/examples/apache2.conf
netdisco-frontend: /etc/netdisco/netdisco_apache2.conf
pnopaste: /etc/pnopaste/apache2.conf
smokeping: /etc/smokeping/apache2.conf
spip: /usr/share/doc/spip/apache2.conf
torrus-apache2: /etc/torrus/torrus-apache2.conf
w3c-markup-validator: /etc/w3c/w3c-markup-validator-apache2.conf
user@hostname:~$