debsums can verify the integrity of installed package files against MD5 checksums installed by the package, or generated from a .deb archive.
0- Install debsums
sudo apt-get install debsums
1- Script for looking MISSING or FAILED (modified packages):
find.sh
Code: Select all
#!/bin/bash
#
clear
if [[ $1 == "" ]]; then
echo "Buscando todos paquetes!!"
sudo debsums -a 2>&1|grep -e "missing file" -e "FAILED"
else
echo "Buscando paquetes con: $1"
sudo apt-cache search "$1"|awk '{print $1}'|xargs debsums -a 2>&1|grep -e "missing file" -e "FAILED"
fi
It might take a time (some minits to md5-check all packages in our system)
3- Search for modified packages and reinstall to repair.:
3.0. Search for altered package:
sudo dpkg -S libxx.so.xx (reported by debsum)
--> It reports Name package
3.1 Repair/reinstall all altered packages retuned by "find script" (debsums):
sudo apt-get install --reinstall Namepackage1
sudo apt-get install --reinstall Namepackage2
..
sudo apt-get install --reinstall NamepackageN