{
    "content": [
        {
            "type": "text",
            "text": "# dpkg-scanpackages(1) (man)\n\n## NAME\n\ndpkg-scanpackages - create Packages index files\n\n## SYNOPSIS\n\ndpkg-scanpackages [option...] binary-path [override-file [path-prefix]] > Packages\n\n## DESCRIPTION\n\ndpkg-scanpackages sorts through a tree of Debian binary packages and creates a Packages file,\nused by apt(8), dselect(1), etc, to tell the user what packages are available for\ninstallation. These Packages files are the same as those found on Debian archive sites and\nCD-ROMs. You might use dpkg-scanpackages yourself if making a directory of local packages to\ninstall on a cluster of machines.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (7 subsections)\n- **ENVIRONMENT**\n- **DIAGNOSTICS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "dpkg-scanpackages",
        "section": "1",
        "mode": "man",
        "summary": "dpkg-scanpackages - create Packages index files",
        "synopsis": "dpkg-scanpackages [option...] binary-path [override-file [path-prefix]] > Packages",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-t",
                "long": "--type",
                "arg": null,
                "description": "Scan for *.type packages, instead of *.deb."
            },
            {
                "flag": "-e",
                "long": "--extra-override",
                "arg": null,
                "description": "Scan file to find supplementary overrides (the file can be compressed since dpkg 1.15.5). See deb-extra-override(5) for more information on its format."
            },
            {
                "flag": "-a",
                "long": "--arch",
                "arg": null,
                "description": "Use a pattern consisting of *all.deb and *arch.deb instead of scanning for all debs."
            },
            {
                "flag": "-h",
                "long": "--hash",
                "arg": null,
                "description": "Only generate file hashes for the comma-specified list specified (since dpkg 1.17.14). The default is to generate all currently supported hashes. Supported values: md5, sha1, sha256."
            },
            {
                "flag": "-m",
                "long": "--multiversion",
                "arg": null,
                "description": "Include all found packages in the output."
            },
            {
                "flag": "-M",
                "long": "--medium",
                "arg": null,
                "description": "Add an X-Medium field containing the value id-string (since dpkg 1.15.5). This field is required if you want to generate Packages.cd files for use by the multicd access method of dselect. -?, --help Show the usage message and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Show the version and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "dpkg",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dpkg/1/json"
            },
            {
                "name": "dselect",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dselect/1/json"
            },
            {
                "name": "deb-override",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-override/5/json"
            },
            {
                "name": "deb-extra-override",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-extra-override/5/json"
            },
            {
                "name": "dpkg-scansources",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dpkg-scansources/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-t --type",
                        "lines": 2,
                        "flag": "-t",
                        "long": "--type"
                    },
                    {
                        "name": "-e --extra-override",
                        "lines": 3,
                        "flag": "-e",
                        "long": "--extra-override"
                    },
                    {
                        "name": "-a --arch",
                        "lines": 2,
                        "flag": "-a",
                        "long": "--arch"
                    },
                    {
                        "name": "-h --hash",
                        "lines": 4,
                        "flag": "-h",
                        "long": "--hash"
                    },
                    {
                        "name": "-m --multiversion",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--multiversion"
                    },
                    {
                        "name": "-M --medium",
                        "lines": 7,
                        "flag": "-M",
                        "long": "--medium"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "dpkg-scanpackages - create Packages index files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "dpkg-scanpackages [option...] binary-path [override-file [path-prefix]] > Packages\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "dpkg-scanpackages sorts through a tree of Debian binary packages and creates a Packages file,\nused by apt(8), dselect(1), etc, to tell the user what packages are available for\ninstallation. These Packages files are the same as those found on Debian archive sites and\nCD-ROMs. You might use dpkg-scanpackages yourself if making a directory of local packages to\ninstall on a cluster of machines.\n\nNote: If you want to access the generated Packages file with apt(8) you will probably need to\ncompress the file with xz(1) (generating a Packages.xz file), bzip2(1) (generating a\nPackages.bz2 file) or gzip(1) (generating a Packages.gz file).  apt(8) ignores uncompressed\nPackages files except on local access (i.e.  file:// sources).\n\nbinary-path is the name of the tree of the binary packages to process (for example,\ncontrib/binary-i386).  It is best to make this relative to the root of the Debian archive,\nbecause every Filename field in the new Packages file will start with this string.\n\noverride-file is the name of a file to read which contains information about how the package\nfits into the distribution (the file can be compressed since dpkg 1.15.5); see deb-\noverride(5).\n\npath-prefix is an optional string to be prepended to the Filename fields.\n\nIf more than one version of a package is found only the newest one is included in the output.\nIf they have the same version and only differ in architecture only the first one found is\nused.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-t --type",
                        "content": "Scan for *.type packages, instead of *.deb.\n",
                        "flag": "-t",
                        "long": "--type"
                    },
                    {
                        "name": "-e --extra-override",
                        "content": "Scan file to find supplementary overrides (the file can be compressed since dpkg 1.15.5).\nSee deb-extra-override(5) for more information on its format.\n",
                        "flag": "-e",
                        "long": "--extra-override"
                    },
                    {
                        "name": "-a --arch",
                        "content": "Use a pattern consisting of *all.deb and *arch.deb instead of scanning for all debs.\n",
                        "flag": "-a",
                        "long": "--arch"
                    },
                    {
                        "name": "-h --hash",
                        "content": "Only generate file hashes for the comma-specified list specified (since dpkg 1.17.14).\nThe default is to generate all currently supported hashes.  Supported values: md5, sha1,\nsha256.\n",
                        "flag": "-h",
                        "long": "--hash"
                    },
                    {
                        "name": "-m --multiversion",
                        "content": "Include all found packages in the output.\n",
                        "flag": "-m",
                        "long": "--multiversion"
                    },
                    {
                        "name": "-M --medium",
                        "content": "Add an X-Medium field containing the value id-string (since dpkg 1.15.5).  This field is\nrequired if you want to generate Packages.cd files for use by the multicd access method\nof dselect.\n\n-?, --help\nShow the usage message and exit.\n",
                        "flag": "-M",
                        "long": "--medium"
                    },
                    {
                        "name": "--version",
                        "content": "Show the version and exit.\n",
                        "long": "--version"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "DPKGCOLORS\nSets the color mode (since dpkg 1.18.5).  The currently accepted values are: auto\n(default), always and never.\n\nDPKGNLS\nIf set, it will be used to decide whether to activate Native Language Support, also known\nas internationalization (or i18n) support (since dpkg 1.19.0).  The accepted values are:\n0 and 1 (default).\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "dpkg-scanpackages outputs the usual self-explanatory errors. It also warns about packages\nthat are in the wrong subdirectory, are duplicated, have a Filename field in their control\nfile, are missing from the override file, or have maintainer substitutions which do not take\neffect.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "dpkg(1), dselect(1), deb-override(5), deb-extra-override(5), dpkg-scansources(1).\n\n\n\n1.21.1                                       2025-09-09                         dpkg-scanpackages(1)",
                "subsections": []
            }
        }
    }
}