I think that a simple consistency check about obsolete libraries might be helpful.
So far I've used this to detect old libraries not managed by dpkg: find /lib/x86_64-linux-gnu -type f \ | grep -v -x -F -f \ <(find '/var/lib/dpkg/info' -name '*.list' -print0 \ | xargs -0 grep -h '^/lib/x86_64-linux-gnu' \ | sort -u)