DEBSUMS(1)
๐ DEBSUMS(1) ๐
okay bestie, pull up a chair, because debsums is literally the vibe-check tool for your Debian install โจ
debsums โ check the MD5 sums of installed Debian packages. no cap, that's the whole job and it eats every time ๐
โจ SYNOPSIS โจ
debsums [options] [package|deb] ...
๐ฆ DESCRIPTION ๐ฆ
So here's the tea, bestie: debsums verifies your installed Debian package files against the MD5 checksum lists that live in /var/lib/dpkg/info/*.md5sums. it's giving "did somebody touch my files or is this just the normal amount of file" ๐ธ
And here's the iconic part โ debsums can generate checksum lists from deb archives for packages that don't include one. like, it'll make the receipts for you ๐
๐ OPTIONS ๐
-a,--allโ also check configuration files (normally excluded). yes bestie, the config files get a vibe check too.-e,--configโ only check configuration files. just the configs, nothing else, periodt.-c,--changedโ report the changed file list to stdout (implies-s). heads up: this quietly turns on silent mode too.-l,--list-missingโ list packages (or debs) which don't have an MD5 sums file. a little "who forgot their homework" list ๐-s,--silentโ only report errors. no small talk, only problems.- *
-m,--md5sums=file* โ read the list of deb checksums from file. - *
-r,--root=dir* โ root directory to check (default/). - *
-d,--admindir=dir* โ dpkg admin directory (default/var/lib/dpkg). - *
-p,--deb-path=dir[:dir...]* โ directories in which to look for debs derived from the package name (default is the current directory).
a genuinely useful value here is /var/cache/apt/archives when you're using apt-get autoclean or not clearing the cache at all. so like, this command:
apt-get --reinstall -d install `debsums -l`
may be used to populate the cache with any debs not already in the cache. slay. ๐ฅ
Note: this doesn't work for CD-ROM and other local sources as packages are not copied to/var/cache. simple file sources (all debs in a single directory) should be added to the-plist. iykyk ๐
-g,--generate=[missing|all][,nocheck]โ generate MD5 sums from deb contents. if the argument is a package name rather than a deb archive, the program will look for a deb namedpackage_version_arch.debin the directories given by the-poption.missingโ generate MD5 sums from the deb for packages which don't provide one.allโ ignore the on disk sums and use the one supplied in the deb, or generated from it if none exists.nocheckโ the extracted/generated sums are not checked against the installed package.
for backward compatibility, the short option -g is equivalent to --generate=missing. ๐ง
--no-locale-purgeโ report missing locale files even iflocalepurgeis configured.--no-prelinkโ report changed ELF files even ifprelinkis configured.--ignore-permissionsโ treat permission errors as warnings when running as non-root. we're being chill about it ๐--ignore-obsoleteโ ignore obsolete conffiles.--help/--versionโ print help and version information.
๐ EXIT STATUS ๐
debsums returns 0 on success, or a *combination** of the following values on error:
1โ a specified package or archive name was not installed, invalid, or the installed version did not match the given archive.2โ changed or missing package files, or checksum mismatch on an archive.255โ invalid option.
*If both of the first two conditions are true, the exit status will be 3.
๐ EXAMPLES ๐
debsums foo barโ check the sums for installed packagesfooandbar.debsums foo.deb bar.debโ as above, using checksums from (or generated from) the archives.debsums -lโ list installed packages with no checksums.debsums -caโ list changed package files from all installed packages with checksums.debsums -ceโ list changed configuration files.debsums -cagp /var/cache/apt/archivesโ as above, using sums from cached debs where available.
and the big one, bestie โ reinstalling packages with changed files:
apt-get install --reinstall $(dpkg -S $(debsums -c) | cut -d : -f 1 |
sort -u)
๐ RESULTS ๐
OKโ the file's MD5 sum is good. we love to see it ๐FAILEDโ the file's MD5 sum does not match. ๐ญREPLACEDโ the file has been replaced by a file from a different package.
๐ธ SEE ALSO ๐ธ
md5sum(1), โ go give it a little kiss too ๐ซถ
โจ ENVIRONMENT โจ
TMPDIRโ directory for extracting information and contents from package archives (/tmpby default).
โญ CAVEATS โญ
ngl, there are some things you gotta know before you go off:
While in general the program may be run as a normal user, some packages contain files which are not globally readable so cannot be checked. privileges are of course also required when generating sums with the keep option set.
Files which have been replaced by another package may be erroneously reported as changed. so like, don't panic immediately ๐
debsums is intended primarily as a way of determining what installed files have been locally modified by the administrator or damaged by media errors and is of limited use as a security tool. read that again, bestie โ it is not your security tool, okay?
If you are looking for an integrity checker that can run from safe media, do integrity checks on checksum databases and can be easily configured to run periodically to warn the admin of changes see other tools such as: aide, integrit, samhain, or tripwire.
๐ AUTHOR ๐
Written by Brendan O'Dea <bod@debian.org>. Based on a program by Christoph Lameter <clameter@debian.org> and Petr Cech <cech@debian.org>.
๐ COPYRIGHT ๐
Copyright ยฉ 2002 Brendan O'Dea <bod@debian.org> This is free software, licensed under the terms of the GNU General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and that's the whole page, bestie ๐
this was User Commands realness from the Debian fam, filed under DEBSUMS(1) โ go check your sums and stay iconic ๐โจ๐ฆ
๐ฆ where this page comes from
- debian trixie: debsums 3.0.2.3 ยท GPL
- ubuntu resolute: debsums 3.0.2.3 ยท GPL
- ubuntu stonking: debsums 3.0.2.4 ยท GPL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms