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


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

Signature Errors on Ubuntu repositories

On all of the Ubuntu installs I’ve ever had, I almost always eventually run into the following error when running the ‘apt-get update’ command or hitting the ‘Reload’ button in Synaptic.

W: GPG error: hardy-updates Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
W: You may want to run apt-get update to correct these problems

From what I understand the problem comes from apt downloading an incomplete/corrupt signature file, meaning that the signature then doesn’t match that of the packages. The fix at the moment is to simply delete the incomplete/corrupt signature file and download it again. To do this run the following command:

sudo rm /var/lib/apt/lists/partial/*

Afterwards running apt-get update doesn’t return the same error.