{
    "content": [
        {
            "type": "text",
            "text": "# debsums (man)\n\n## NAME\n\ndebsums - check the MD5 sums of installed Debian packages\n\n## SYNOPSIS\n\ndebsums [options] [package|deb] ...\n\n## DESCRIPTION\n\nVerify    installed    Debian    package    files    against    MD5   checksum   lists   from\n/var/lib/dpkg/info/*.md5sums.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (16 subsections)\n- **EXIT STATUS**\n- **EXAMPLES**\n- **RESULTS**\n- **SEE ALSO**\n- **ENVIRONMENT**\n- **CAVEATS**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "debsums",
        "section": "",
        "mode": "man",
        "summary": "debsums - check the MD5 sums of installed Debian packages",
        "synopsis": "debsums [options] [package|deb] ...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-a",
                "long": "--all",
                "arg": null,
                "description": "Also check configuration files (normally excluded)."
            },
            {
                "flag": "-e",
                "long": "--config",
                "arg": null,
                "description": "Only check configuration files."
            },
            {
                "flag": "-c",
                "long": "--changed",
                "arg": null,
                "description": "Report changed file list to stdout (implies -s)."
            },
            {
                "flag": "-l",
                "long": "--list-missing",
                "arg": null,
                "description": "List packages (or debs) which don't have an MD5 sums file."
            },
            {
                "flag": "-s",
                "long": "--silent",
                "arg": null,
                "description": "Only report errors."
            },
            {
                "flag": "-m",
                "long": "--md5sums",
                "arg": null,
                "description": "Read list of deb checksums from file."
            },
            {
                "flag": "-r",
                "long": "--root",
                "arg": null,
                "description": "Root directory to check (default /)."
            },
            {
                "flag": "-d",
                "long": "--admindir",
                "arg": null,
                "description": "dpkg admin directory (default /var/lib/dpkg)."
            },
            {
                "flag": "-p",
                "long": "--deb-path",
                "arg": null,
                "description": "Directories in which to look for debs derived from the package name (default is the current directory). A useful value is /var/cache/apt/archives when using apt-get autoclean or not clearing the cache at all. The command: apt-get --reinstall -d install `debsums -l` may be used to populate the cache with any debs not already in the cache. 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 -p list."
            },
            {
                "flag": "-g",
                "long": "--generate",
                "arg": null,
                "description": "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 named packageversionarch.deb in the di‐ rectories given by the -p option. 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. keep Write the extracted/generated sums to /var/lib/dpkg/info/package.md5sums. nocheck Implies keep; the extracted/generated sums are not checked against the in‐ stalled package. For backward compatibility, the short option -g is equivalent to --generate=missing."
            },
            {
                "flag": "",
                "long": "--no-locale-purge",
                "arg": null,
                "description": "Report missing locale files even if localepurge is configured."
            },
            {
                "flag": "",
                "long": "--no-prelink",
                "arg": null,
                "description": "Report changed ELF files even if prelink is configured."
            },
            {
                "flag": "",
                "long": "--ignore-permissions",
                "arg": null,
                "description": "Treat permission errors as warnings when running as non-root."
            },
            {
                "flag": "",
                "long": "--ignore-obsolete",
                "arg": null,
                "description": "Ignore obsolete conffiles."
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print help and version information."
            }
        ],
        "examples": [
            "debsums foo bar",
            "Check the sums for installed packages foo and bar.",
            "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.",
            "apt-get install --reinstall $(dpkg -S $(debsums -c) | cut -d : -f 1 | sort -u)",
            "Reinstalls packages with changed files."
        ],
        "see_also": [
            {
                "name": "md5sum",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/md5sum/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a --all",
                        "lines": 2,
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "-e --config",
                        "lines": 2,
                        "flag": "-e",
                        "long": "--config"
                    },
                    {
                        "name": "-c --changed",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--changed"
                    },
                    {
                        "name": "-l --list-missing",
                        "lines": 2,
                        "flag": "-l",
                        "long": "--list-missing"
                    },
                    {
                        "name": "-s --silent",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-m --md5sums",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--md5sums"
                    },
                    {
                        "name": "-r --root",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--root"
                    },
                    {
                        "name": "-d --admindir",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--admindir"
                    },
                    {
                        "name": "-p --deb-path",
                        "lines": 14,
                        "flag": "-p",
                        "long": "--deb-path"
                    },
                    {
                        "name": "-g --generate",
                        "lines": 18,
                        "flag": "-g",
                        "long": "--generate"
                    },
                    {
                        "name": "--no-locale-purge",
                        "lines": 2,
                        "long": "--no-locale-purge"
                    },
                    {
                        "name": "--no-prelink",
                        "lines": 2,
                        "long": "--no-prelink"
                    },
                    {
                        "name": "--ignore-permissions",
                        "lines": 2,
                        "long": "--ignore-permissions"
                    },
                    {
                        "name": "--ignore-obsolete",
                        "lines": 2,
                        "long": "--ignore-obsolete"
                    },
                    {
                        "name": "--help",
                        "lines": 1,
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "RESULTS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "CAVEATS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "debsums - check the MD5 sums of installed Debian packages\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "debsums [options] [package|deb] ...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Verify    installed    Debian    package    files    against    MD5   checksum   lists   from\n/var/lib/dpkg/info/*.md5sums.\n\ndebsums can generate checksum lists from deb archives for packages that don't include one.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-a --all",
                        "content": "Also check configuration files (normally excluded).\n",
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "-e --config",
                        "content": "Only check configuration files.\n",
                        "flag": "-e",
                        "long": "--config"
                    },
                    {
                        "name": "-c --changed",
                        "content": "Report changed file list to stdout (implies -s).\n",
                        "flag": "-c",
                        "long": "--changed"
                    },
                    {
                        "name": "-l --list-missing",
                        "content": "List packages (or debs) which don't have an MD5 sums file.\n",
                        "flag": "-l",
                        "long": "--list-missing"
                    },
                    {
                        "name": "-s --silent",
                        "content": "Only report errors.\n",
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-m --md5sums",
                        "content": "Read list of deb checksums from file.\n",
                        "flag": "-m",
                        "long": "--md5sums"
                    },
                    {
                        "name": "-r --root",
                        "content": "Root directory to check (default /).\n",
                        "flag": "-r",
                        "long": "--root"
                    },
                    {
                        "name": "-d --admindir",
                        "content": "dpkg admin directory (default /var/lib/dpkg).\n",
                        "flag": "-d",
                        "long": "--admindir"
                    },
                    {
                        "name": "-p --deb-path",
                        "content": "Directories in which to look for debs derived from the package name  (default  is  the\ncurrent directory).\n\nA useful value is /var/cache/apt/archives when using apt-get autoclean or not clearing\nthe cache at all.  The command:\n\napt-get --reinstall -d install `debsums -l`\n\nmay be used to populate the cache with any debs not already in the cache.\n\nNote: This doesn't work for CD-ROM and other local sources as packages are not  copied\nto  /var/cache.   Simple file sources (all debs in a single directory) should be added\nto the -p list.\n",
                        "flag": "-p",
                        "long": "--deb-path"
                    },
                    {
                        "name": "-g --generate",
                        "content": "Generate MD5 sums from deb contents.  If the argument is a package name rather than  a\ndeb archive, the program will look for a deb named packageversionarch.deb in the di‐\nrectories given by the -p option.\n\nmissing\nGenerate MD5 sums from the deb for packages which don't provide one.\n\nall    Ignore the on disk sums and use the one supplied in the deb, or generated  from\nit if none exists.\n\nkeep   Write the extracted/generated sums to /var/lib/dpkg/info/package.md5sums.\n\nnocheck\nImplies  keep;  the  extracted/generated  sums  are not checked against the in‐\nstalled package.\n\nFor backward compatibility, the short option -g is equivalent to --generate=missing.\n",
                        "flag": "-g",
                        "long": "--generate"
                    },
                    {
                        "name": "--no-locale-purge",
                        "content": "Report missing locale files even if localepurge is configured.\n",
                        "long": "--no-locale-purge"
                    },
                    {
                        "name": "--no-prelink",
                        "content": "Report changed ELF files even if prelink is configured.\n",
                        "long": "--no-prelink"
                    },
                    {
                        "name": "--ignore-permissions",
                        "content": "Treat permission errors as warnings when running as non-root.\n",
                        "long": "--ignore-permissions"
                    },
                    {
                        "name": "--ignore-obsolete",
                        "content": "Ignore obsolete conffiles.\n",
                        "long": "--ignore-obsolete"
                    },
                    {
                        "name": "--help",
                        "content": "",
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "content": "Print help and version information.\n",
                        "long": "--version"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "debsums returns 0 on success, or a combination* of the following values on error:\n\n1      A specified package or archive name was not installed, invalid or the  installed  ver‐\nsion did not match the given archive.\n\n2      Changed or missing package files, or checksum mismatch on an archive.\n\n255    Invalid option.\n\n*If both of the first two conditions are true, the exit status will be 3.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "debsums foo bar\nCheck the sums for installed packages foo and bar.\n\ndebsums foo.deb bar.deb\nAs above, using checksums from (or generated from) the archives.\n\ndebsums -l\nList installed packages with no checksums.\n\ndebsums -ca\nList changed package files from all installed packages with checksums.\n\ndebsums -ce\nList changed configuration files.\n\ndebsums -cagp /var/cache/apt/archives\nAs above, using sums from cached debs where available.\n\napt-get install --reinstall $(dpkg -S $(debsums -c) | cut -d : -f 1 | sort -u)\nReinstalls packages with changed files.\n",
                "subsections": []
            },
            "RESULTS": {
                "content": "OK     The file's MD5 sum is good.\n\nFAILED The file's MD5 sum does not match.\n\nREPLACED\nThe file has been replaced by a file from a different package.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "md5sum(1),\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "TMPDIR Directory  for  extracting information and contents from package archives (/tmp by de‐\nfault).\n",
                "subsections": []
            },
            "CAVEATS": {
                "content": "While in general the program may be run as a normal user, some packages contain  files  which\nare  not globally readable so cannot be checked.  Privileges are of course also required when\ngenerating sums with the keep option set.\n\nFiles which have been replaced by another package may be erroneously reported as changed.\n\ndebsums is intended primarily as a way of determining what installed files have been  locally\nmodified  by the administrator or damaged by media errors and is of limited use as a security\ntool.\n\nIf you are looking for an integrity checker that can run from safe media, do integrity checks\non  checksum  databases and can be easily configured to run periodically to warn the admin of\nchanges see other tools such as: aide, integrit, samhain, or tripwire.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Written by Brendan O'Dea <bod@debian.org>.\nBased on a program  by  Christoph  Lameter  <clameter@debian.org>  and  Petr  Cech  <cech@de‐\nbian.org>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2002  Brendan O'Dea <bod@debian.org>\nThis  is free software, licensed under the terms of the GNU General Public License.  There is\nNO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n\n\nUser Commands                                  Debian                                     DEBSUMS(1)",
                "subsections": []
            }
        }
    }
}