I can't find a way to easily search for files installed by packages to confirm I don't have missing dependencies and was hoping someone could point me in the right direction, or help me script up what I have found so far....
What I want to be able to do is search for all files that should exist on my system (Ubuntu), by listing the contents of all installed packages, and then searching for those files in the locations they should exist in.
The reason behind this is that I have installed 3rd party NVidia drivers and want to remove them, but then how do I confirm that it hasn't removed files that were installed by another package libgl-mesa-glx for example.
That got me onto wanting to script it, so I am able to confirm the health of my system in general from time to time as packages get installed and removed over time.
I know I can use dpkg --get-selections and pipe that to a text file, and dpkg -L $package, or dlocate which will list the files installed by a given package but how can I pipe the installed packages list to dpkg, and then pipe the list of path/filenames to find to search for the files?
The other thing I'd like to be able to do is confirm the file size matches the one in the package if that's possible?
Hoping someone can help me out
Thanks in advance!