The most part of deb packages come with a md5 file containing signatures of all files in the package. This files is located at
To simplify the periodic check of all installed packages, the
debsums package can be of help. Install it, clean the cache with
sudo apt-get clean
sudo debsums_init to generate md5 sums for packages that do not provide them (the packages are downloaded to generate such sums).
Next, edit the file
/etc/default/debsums and set
CRON_CHECK=weekly to configure a cron weekly job for the check of debsums.
You can run the check manually with the command
sudo debsums -cs
Regarding the integrity of the dependencies, I suppose that the command
sudo apt-get -f install
should signal and try to resolve any problem it finds relative to installed packages, but the debian/ubuntu package management system is a very complex object, and could be very difficult to find and resolve its problems.