Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Howto: Search & Repair All corrupted Packages

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Howto: Search & Repair All corrupted Packages

#1 Post by bester69 »

We can search for any modified file in our system by using "debsums":
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
2- we run "find" script, and it will show in stdout all missing/failed files.
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
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

marcetm
Posts: 135
Joined: 2015-08-02 21:30

Re: Howto: Search & Repair All corrupted Packages

#2 Post by marcetm »

Added to my bookmark. Thanks for sharing.

Post Reply