Also dpkg has the following options to check files, dpkg -V packagename for verifying, dpkg -C packagename for auditing
-V, --verify [package-name...]
Verifies the integrity of package-name or all packages if omitted, by comparing information from the files installed by a package with the files metadata information
stored in the dpkg database (since dpkg 1.17.2). The origin of the files metadata information in the database is the binary packages themselves. That metadata gets
collected at package unpack time during the installation process.
Currently the only functional check performed is an md5sum verification of the file contents against the stored value in the files database. It will only get
checked if the database contains the file md5sum. To check for any missing metadata in the database, the --audit command can be used.
The output format is selectable with the --verify-format option, which by default uses the rpm format, but that might change in the future, and as such, programs
parsing this command output should be explicit about the format they expect.
-C, --audit [package-name...]
Performs database sanity and consistency checks for package-name or all packages if omitted (per package checks since dpkg 1.17.10). For example, searches for
packages that have been installed only partially on your system or that have missing, wrong or obsolete control data or files. dpkg will suggest what to do with them
to get them fixed.