I've been having some memory corruption issues, causing random crashes, but I've fixed them now. However, I'm concerned that some packages may be corrupted (as naturally any package update has to go through memory before it's written to disk).

Is there any way to automatically checksum all of the package files on a Debian system, and compare them to the archives, and if they're incorrect, update them?


I just found the answer, the Debian package and command debsums. I'll leave this here for reference for anyone in the future.

It can be used on most (all?) Debian derivatives, including Ubuntu; it verifies installed binaries and configuration files against checksums installed with each package. Fixing a corrupted system is as easy as runn

apt-get install --reinstall $(dpkg -S $(debsums -c) | cut -d : -f 1 | sort -u)

(see the manpage for details).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.