Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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