{
    "content": [
        {
            "type": "text",
            "text": "# dpkg-deb(1) (man)\n\n## TLDR\n\n> Pack, unpack, and provide information about Debian archives.\n\n- Display information about a package:\n  `dpkg-deb {{-I|--info}} {{path/to/file.deb}}`\n- Display the package's name and version on one line:\n  `dpkg-deb {{-W|--show}} {{path/to/file.deb}}`\n- List the package's contents:\n  `dpkg-deb {{-c|--contents}} {{path/to/file.deb}}`\n- Extract package's contents into a directory:\n  `dpkg-deb {{-x|--extract}} {{path/to/file.deb}} {{path/to/directory}}`\n- Create a package from a specified directory:\n  `dpkg-deb {{-b|--build}} {{path/to/directory}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** dpkg-deb - Debian package archive (.deb) manipulation tool\n\n**Synopsis:** dpkg-deb [option...] command\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -z | — | — | Specify which compression level to use on the compressor backend, when building a package (default is 9 for gzip, 6 for  |\n| -S | — | — | Specify which compression strategy to use on the compressor backend, when building a package (since dpkg 1.16.2). Allowe |\n| -Z | — | — | Specify which compression type to use when building a package. Allowed values are gzip, xz (since dpkg 1.15.6), zstd (si |\n| — | — | — | Specify that the same compression parameters should be used for all archive members (i.e. control.tar and data.tar; sinc |\n| — | --root-owner-group | — | Set the owner and group for each entry in the filesystem tree data to root with id 0 (since dpkg 1.19.0). Note: This opt |\n| — | --nocheck | — | Inhibits dpkg-deb --build's usual checks on the proposed contents of an archive. You can build any archive you want, no  |\n| -v | --verbose | — | Enables verbose output (since dpkg 1.16.1). This currently only affects --extract making it behave like --vextract. |\n| -D | --debug | — | Enables debugging output. This is not very interesting. |\n\n## See Also\n\n- deb(5)\n- deb-control(5)\n- dpkg(1)\n- dselect(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (11 lines)\n- **COMMANDS** (1 lines) — 10 subsections\n  - -b --build (21 lines)\n  - -I --info (9 lines)\n  - -W --show (4 lines)\n  - -f --field (10 lines)\n  - -c --contents (3 lines)\n  - -x --extract (8 lines)\n  - -X --vextract (3 lines)\n  - -R --raw-extract (20 lines)\n  - -e --control (10 lines)\n  - --version (2 lines)\n- **OPTIONS** (11 lines) — 8 subsections\n  - -z (5 lines)\n  - -S (4 lines)\n  - -Z (3 lines)\n  - --[no-]uniform-compression (6 lines)\n  - --root-owner-group (15 lines)\n  - --nocheck (3 lines)\n  - -v --verbose (3 lines)\n  - -D --debug (2 lines)\n- **EXIT STATUS** (5 lines)\n- **ENVIRONMENT** (12 lines)\n- **NOTES** (4 lines)\n- **BUGS** (7 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\ndpkg-deb - Debian package archive (.deb) manipulation tool\n\n### SYNOPSIS\n\ndpkg-deb [option...] command\n\n### DESCRIPTION\n\ndpkg-deb packs, unpacks and provides information about Debian archives.\n\nUse dpkg to install and remove packages from your system.\n\nYou can also invoke dpkg-deb by calling dpkg with whatever options you want to pass to dpkg-\ndeb. dpkg will spot that you wanted dpkg-deb and run it for you.\n\nFor most commands taking an input archive argument, the archive can be read from standard\ninput if the archive name is given as a single minus character («-»); otherwise lack of\nsupport will be documented in their respective command description.\n\n### COMMANDS\n\n#### -b --build\n\nCreates a debian archive from the filesystem tree stored in binary-directory. binary-\ndirectory must have a DEBIAN subdirectory, which contains the control information files\nsuch as the control file itself. This directory will not appear in the binary package's\nfilesystem archive, but instead the files in it will be put in the binary package's\ncontrol information area.\n\nUnless you specify --nocheck, dpkg-deb will read DEBIAN/control and parse it. It will\ncheck the file for syntax errors and other problems, and display the name of the binary\npackage being built.  dpkg-deb will also check the permissions of the maintainer scripts\nand other files found in the DEBIAN control information directory.\n\nIf no archive is specified then dpkg-deb will write the package into the file binary-\ndirectory.deb.\n\nIf the archive to be created already exists it will be overwritten.\n\nIf the second argument is a directory then dpkg-deb will write to the file\ndirectory/packageversionarch.deb.  When a target directory is specified, rather than a\nfile, the --nocheck option may not be used (since dpkg-deb needs to read and parse the\npackage control file to determine which filename to use).\n\n#### -I --info\n\nProvides information about a binary package archive.\n\nIf no control-file-names are specified then it will print a summary of the contents of\nthe package as well as its control file.\n\nIf any control-file-names are specified then dpkg-deb will print them in the order they\nwere specified; if any of the components weren't present it will print an error message\nto stderr about each one and exit with status 2.\n\n#### -W --show\n\nProvides information about a binary package archive in the format specified by the\n--showformat argument. The default format displays the package's name and version on one\nline, separated by a tabulator.\n\n#### -f --field\n\nExtracts control file information from a binary package archive.\n\nIf no control-field-names are specified then it will print the whole control file.\n\nIf any are specified then dpkg-deb will print their contents, in the order in which they\nappear in the control file. If more than one control-field-name is specified then dpkg-\ndeb will precede each with its field name (and a colon and space).\n\nNo errors are reported for fields requested but not found.\n\n#### -c --contents\n\nLists the contents of the filesystem tree archive portion of the package archive. It is\ncurrently produced in the format generated by tar's verbose listing.\n\n#### -x --extract\n\nExtracts the filesystem tree from a package archive into the specified directory.\n\nNote that extracting a package to the root directory will not result in a correct\ninstallation! Use dpkg to install packages.\n\ndirectory (but not its parents) will be created if necessary, and its permissions\nmodified to match the contents of the package.\n\n#### -X --vextract\n\nIs like --extract (-x) with --verbose (-v) which prints a listing of the files extracted\nas it goes.\n\n#### -R --raw-extract\n\nExtracts the filesystem tree from a package archive into a specified directory, and the\ncontrol information files into a DEBIAN subdirectory of the specified directory (since\ndpkg 1.16.1).\n\nThe target directory (but not its parents) will be created if necessary.\n\nThe input archive is not (currently) processed sequentially, so reading it from standard\ninput («-») is not supported.\n\n--ctrl-tarfile archive\nExtracts the control data from a binary package and sends it to standard output in tar\nformat (since dpkg 1.17.14). Together with tar(1) this can be used to extract a\nparticular control file from a package archive.  The input archive will always be\nprocessed sequentially.\n\n--fsys-tarfile archive\nExtracts the filesystem tree data from a binary package and sends it to standard output\nin tar format. Together with tar(1) this can be used to extract a particular file from a\npackage archive.  The input archive will always be processed sequentially.\n\n#### -e --control\n\nExtracts the control information files from a package archive into the specified\ndirectory.\n\nIf no directory is specified then a subdirectory DEBIAN in the current directory is used.\n\nThe target directory (but not its parents) will be created if necessary.\n\n-?, --help\nShow the usage message and exit.\n\n#### --version\n\nShow the version and exit.\n\n### OPTIONS\n\n--showformat=format\nThis option is used to specify the format of the output --show will produce. The format\nis a string that will be output for each package listed.\n\nThe string may reference any status field using the “${field-name}” form, a list of the\nvalid fields can be easily produced using -I on the same package. A complete explanation\nof the formatting options (including escape sequences and field tabbing) can be found in\nthe explanation of the --showformat option in dpkg-query(1).\n\nThe default for this field is “${Package}\\t${Version}\\n”.\n\n#### -z\n\nSpecify which compression level to use on the compressor backend, when building a package\n(default is 9 for gzip, 6 for xz and 19 for zstd).  The accepted values are 0-9 with: 0\nbeing mapped to compressor none for gzip.  Before dpkg 1.16.2 level 0 was equivalent to\ncompressor none for all compressors.\n\n#### -S\n\nSpecify which compression strategy to use on the compressor backend, when building a\npackage (since dpkg 1.16.2). Allowed values are none (since dpkg 1.16.4), filtered,\nhuffman, rle and fixed for gzip (since dpkg 1.17.0) and extreme for xz.\n\n#### -Z\n\nSpecify which compression type to use when building a package.  Allowed values are gzip,\nxz (since dpkg 1.15.6), zstd (since dpkg 1.19.0.5ubuntu2) and none (default is zstd).\n\n#### --[no-]uniform-compression\n\nSpecify that the same compression parameters should be used for all archive members (i.e.\ncontrol.tar and data.tar; since dpkg 1.17.6).  Otherwise only the data.tar member will\nuse those parameters. The only supported compression types allowed to be uniformly used\nare none, gzip, xz and zstd.  The --no-uniform-compression option disables uniform\ncompression (since dpkg 1.19.0).  Uniform compression is the default (since dpkg 1.19.0).\n\n#### --root-owner-group\n\nSet the owner and group for each entry in the filesystem tree data to root with id 0\n(since dpkg 1.19.0).\n\nNote: This option can be useful for rootless builds (see rootless-builds.txt), but should\nnot be used when the entries have an owner or group that is not root.  Support for these\nwill be added later in the form of a meta manifest.\n\n--deb-format=format\nSet the archive format version used when building (since dpkg 1.17.0).  Allowed values\nare 2.0 for the new format, and 0.939000 for the old one (default is 2.0).\n\nThe old archive format is less easily parsed by non-Debian tools and is now obsolete; its\nonly use is when building packages to be parsed by versions of dpkg older than 0.93.76\n(September 1995), which was released as i386 a.out only.\n\n#### --nocheck\n\nInhibits dpkg-deb --build's usual checks on the proposed contents of an archive. You can\nbuild any archive you want, no matter how broken, this way.\n\n#### -v --verbose\n\nEnables verbose output (since dpkg 1.16.1).  This currently only affects --extract making\nit behave like --vextract.\n\n#### -D --debug\n\nEnables debugging output. This is not very interesting.\n\n### EXIT STATUS\n\n0   The requested action was successfully performed.\n\n2   Fatal or unrecoverable error due to invalid command-line usage, or interactions with the\nsystem, such as accesses to the database, memory allocations, etc.\n\n### ENVIRONMENT\n\nDPKGCOLORS\nSets the color mode (since dpkg 1.18.5).  The currently accepted values are: auto\n(default), always and never.\n\nTMPDIR\nIf set, dpkg-deb will use it as the directory in which to create temporary files and\ndirectories.\n\nSOURCEDATEEPOCH\nIf set, it will be used as the timestamp (as seconds since the epoch) in the deb(5)'s\nar(5) container and used to clamp the mtime in the tar(5) file entries.\n\n### NOTES\n\nDo not attempt to use just dpkg-deb to install software! You must use dpkg proper to ensure\nthat all the files are correctly placed and the package's scripts run and its status and\ncontents recorded.\n\n### BUGS\n\ndpkg-deb -I package1.deb package2.deb does the wrong thing.\n\nThere is no authentication on .deb files; in fact, there isn't even a straightforward\nchecksum.  (Higher level tools like APT support authenticating .deb packages retrieved from a\ngiven repository, and most packages nowadays provide an md5sum control file generated by\ndebian/rules. Though this is not directly supported by the lower level tools.)\n\n### SEE ALSO\n\ndeb(5), deb-control(5), dpkg(1), dselect(1).\n\n\n\n1.21.1                                       2025-09-09                                  dpkg-deb(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "dpkg-deb",
        "section": "1",
        "mode": "man",
        "summary": "dpkg-deb - Debian package archive (.deb) manipulation tool",
        "synopsis": "dpkg-deb [option...] command",
        "tldr_summary": "Pack, unpack, and provide information about Debian archives.",
        "tldr_examples": [
            {
                "description": "Display information about a package",
                "command": "dpkg-deb {{-I|--info}} {{path/to/file.deb}}"
            },
            {
                "description": "Display the package's name and version on one line",
                "command": "dpkg-deb {{-W|--show}} {{path/to/file.deb}}"
            },
            {
                "description": "List the package's contents",
                "command": "dpkg-deb {{-c|--contents}} {{path/to/file.deb}}"
            },
            {
                "description": "Extract package's contents into a directory",
                "command": "dpkg-deb {{-x|--extract}} {{path/to/file.deb}} {{path/to/directory}}"
            },
            {
                "description": "Create a package from a specified directory",
                "command": "dpkg-deb {{-b|--build}} {{path/to/directory}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-z",
                "long": null,
                "arg": null,
                "description": "Specify which compression level to use on the compressor backend, when building a package (default is 9 for gzip, 6 for xz and 19 for zstd). The accepted values are 0-9 with: 0 being mapped to compressor none for gzip. Before dpkg 1.16.2 level 0 was equivalent to compressor none for all compressors."
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": "Specify which compression strategy to use on the compressor backend, when building a package (since dpkg 1.16.2). Allowed values are none (since dpkg 1.16.4), filtered, huffman, rle and fixed for gzip (since dpkg 1.17.0) and extreme for xz."
            },
            {
                "flag": "-Z",
                "long": null,
                "arg": null,
                "description": "Specify which compression type to use when building a package. Allowed values are gzip, xz (since dpkg 1.15.6), zstd (since dpkg 1.19.0.5ubuntu2) and none (default is zstd)."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specify that the same compression parameters should be used for all archive members (i.e. control.tar and data.tar; since dpkg 1.17.6). Otherwise only the data.tar member will use those parameters. The only supported compression types allowed to be uniformly used are none, gzip, xz and zstd. The --no-uniform-compression option disables uniform compression (since dpkg 1.19.0). Uniform compression is the default (since dpkg 1.19.0)."
            },
            {
                "flag": "",
                "long": "--root-owner-group",
                "arg": null,
                "description": "Set the owner and group for each entry in the filesystem tree data to root with id 0 (since dpkg 1.19.0). Note: This option can be useful for rootless builds (see rootless-builds.txt), but should not be used when the entries have an owner or group that is not root. Support for these will be added later in the form of a meta manifest. --deb-format=format Set the archive format version used when building (since dpkg 1.17.0). Allowed values are 2.0 for the new format, and 0.939000 for the old one (default is 2.0). The old archive format is less easily parsed by non-Debian tools and is now obsolete; its only use is when building packages to be parsed by versions of dpkg older than 0.93.76 (September 1995), which was released as i386 a.out only."
            },
            {
                "flag": "",
                "long": "--nocheck",
                "arg": null,
                "description": "Inhibits dpkg-deb --build's usual checks on the proposed contents of an archive. You can build any archive you want, no matter how broken, this way."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Enables verbose output (since dpkg 1.16.1). This currently only affects --extract making it behave like --vextract."
            },
            {
                "flag": "-D",
                "long": "--debug",
                "arg": null,
                "description": "Enables debugging output. This is not very interesting."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "deb",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb/5/json"
            },
            {
                "name": "deb-control",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-control/5/json"
            },
            {
                "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "COMMANDS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-b --build",
                        "lines": 21,
                        "flag": "-b",
                        "long": "--build"
                    },
                    {
                        "name": "-I --info",
                        "lines": 9,
                        "flag": "-I",
                        "long": "--info"
                    },
                    {
                        "name": "-W --show",
                        "lines": 4,
                        "flag": "-W",
                        "long": "--show"
                    },
                    {
                        "name": "-f --field",
                        "lines": 10,
                        "flag": "-f",
                        "long": "--field"
                    },
                    {
                        "name": "-c --contents",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--contents"
                    },
                    {
                        "name": "-x --extract",
                        "lines": 8,
                        "flag": "-x",
                        "long": "--extract"
                    },
                    {
                        "name": "-X --vextract",
                        "lines": 3,
                        "flag": "-X",
                        "long": "--vextract"
                    },
                    {
                        "name": "-R --raw-extract",
                        "lines": 20,
                        "flag": "-R",
                        "long": "--raw-extract"
                    },
                    {
                        "name": "-e --control",
                        "lines": 10,
                        "flag": "-e",
                        "long": "--control"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 11,
                "subsections": [
                    {
                        "name": "-z",
                        "lines": 5,
                        "flag": "-z"
                    },
                    {
                        "name": "-S",
                        "lines": 4,
                        "flag": "-S"
                    },
                    {
                        "name": "-Z",
                        "lines": 3,
                        "flag": "-Z"
                    },
                    {
                        "name": "--[no-]uniform-compression",
                        "lines": 6
                    },
                    {
                        "name": "--root-owner-group",
                        "lines": 15,
                        "long": "--root-owner-group"
                    },
                    {
                        "name": "--nocheck",
                        "lines": 3,
                        "long": "--nocheck"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 3,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-D --debug",
                        "lines": 2,
                        "flag": "-D",
                        "long": "--debug"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}