{
    "content": [
        {
            "type": "text",
            "text": "# dpkg-scansources (man)\n\n## NAME\n\ndpkg-scansources - create Sources index files\n\n## SYNOPSIS\n\ndpkg-scansources [option...] binary-dir [override-file [path-prefix]] > Sources\n\n## DESCRIPTION\n\ndpkg-scansources scans the given binary-dir for .dsc files.  These are used to create a\nDebian source index, which is output to stdout.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **ENVIRONMENT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "dpkg-scansources",
        "section": "",
        "mode": "man",
        "summary": "dpkg-scansources - create Sources index files",
        "synopsis": "dpkg-scansources [option...] binary-dir [override-file [path-prefix]] > Sources",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-n",
                "long": "--no-sort",
                "arg": null,
                "description": "Don't sort the index records. Normally they are sorted by source package name."
            },
            {
                "flag": "-e",
                "long": "--extra-override",
                "arg": null,
                "description": "Scan file to find supplementary overrides (since dpkg 1.15.4; the file can be compressed since dpkg 1.15.5). See deb-extra-override(5) for more information on its format."
            },
            {
                "flag": "-s",
                "long": "--source-override",
                "arg": null,
                "description": "Use file as the source override file (the file can be compressed since dpkg 1.15.5). The default is the name of the override file you specified with .src appended. The source override file is in a different format from the binary override file. It contains only two whitespace separated fields, the first is the source package name and the second is the section. Blank lines and comment lines are ignored in the normal manner. If a package appears in both files the source override takes precedence for setting the section."
            },
            {
                "flag": "",
                "long": "--debug",
                "arg": null,
                "description": "Turn debugging on."
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Show the usage message and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Show the version and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "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-scanpackages",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dpkg-scanpackages/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-n --no-sort",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--no-sort"
                    },
                    {
                        "name": "-e --extra-override",
                        "lines": 3,
                        "flag": "-e",
                        "long": "--extra-override"
                    },
                    {
                        "name": "-s --source-override",
                        "lines": 9,
                        "flag": "-s",
                        "long": "--source-override"
                    },
                    {
                        "name": "--debug",
                        "lines": 2,
                        "long": "--debug"
                    },
                    {
                        "name": "--help",
                        "lines": 2,
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "dpkg-scansources - create Sources index files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "dpkg-scansources [option...] binary-dir [override-file [path-prefix]] > Sources\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "dpkg-scansources scans the given binary-dir for .dsc files.  These are used to create a\nDebian source index, which is output to stdout.\n\nThe override-file, if given, is used to set priorities in the resulting index records and to\noverride the maintainer field given in the .dsc files.  The file can be compressed (since\ndpkg 1.15.5).  See deb-override(5) for the format of this file.\n\nNote: Since the override file is indexed by binary, not source packages, there's a bit of a\nproblem here. The current implementation uses the highest priority of all the binary packages\nproduced by a .dsc file for the priority of the source package, and the override entry for\nthe first binary package listed in the .dsc file to modify maintainer information. This might\nchange.\n\nThe path-prefix, if given, is prepended to the directory field in the generated source index.\nYou generally use this to make the directory fields contain the path from the top of the\nDebian archive hierarchy.\n\nNote: If you want to access the generated Sources file with apt(8) you will probably need to\ncompress the file with gzip(1) (generating a Sources.gz file).  apt(8) ignores uncompressed\nSources files except on local access (i.e.  file:// sources).\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-n --no-sort",
                        "content": "Don't sort the index records. Normally they are sorted by source package name.\n",
                        "flag": "-n",
                        "long": "--no-sort"
                    },
                    {
                        "name": "-e --extra-override",
                        "content": "Scan file to find supplementary overrides (since dpkg 1.15.4; the file can be compressed\nsince dpkg 1.15.5).  See deb-extra-override(5) for more information on its format.\n",
                        "flag": "-e",
                        "long": "--extra-override"
                    },
                    {
                        "name": "-s --source-override",
                        "content": "Use file as the source override file (the file can be compressed since dpkg 1.15.5).  The\ndefault is the name of the override file you specified with .src appended.\n\nThe source override file is in a different format from the binary override file. It\ncontains only two whitespace separated fields, the first is the source package name and\nthe second is the section. Blank lines and comment lines are ignored in the normal\nmanner. If a package appears in both files the source override takes precedence for\nsetting the section.\n",
                        "flag": "-s",
                        "long": "--source-override"
                    },
                    {
                        "name": "--debug",
                        "content": "Turn debugging on.\n",
                        "long": "--debug"
                    },
                    {
                        "name": "--help",
                        "content": "Show the usage message and exit.\n",
                        "long": "--help"
                    },
                    {
                        "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": []
            },
            "SEE ALSO": {
                "content": "deb-override(5), deb-extra-override(5), dpkg-scanpackages(1).\n\n\n\n1.21.1                                       2025-09-09                          dpkg-scansources(1)",
                "subsections": []
            }
        }
    }
}