{
    "mode": "man",
    "parameter": "dpkg-realpath",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/dpkg-realpath/1/json",
    "generated": "2026-06-03T01:36:42Z",
    "synopsis": "dpkg-realpath [option...] pathname",
    "sections": {
        "NAME": {
            "content": "dpkg-realpath - print the resolved pathname with DPKGROOT support\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dpkg-realpath [option...] pathname\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "dpkg-realpath is a tool (since dpkg 1.20.1) to resolve a pathname, that takes the dpkg(1)\nroot directory into account, either implicitly from the DPKGROOT environment variable or\nfrom the command-line --root or --instdir options, and returns an absolute pathname relative\nto the root directory.  The root directory must not be prefixed to the pathname to be\nresolved.\n\nThis is intended to be used by other dpkg helpers, or by maintainer scripts instead of using\nrealpath(1) or readlink(1) to canonicalize pathnames, as these latter commands do not support\ncanonicalization relative to a different root than /.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-z --zero",
                    "content": "Use a NUL byte to end output lines instead of a new line character (since dpkg 1.20.6).\n\n--instdir directory\n--root directory\nSet the root directory to directory, which is the base directory that pathnames get\ncanonicalized against.  Defaults to «/».\n\n-?, --help\nShow the usage message and exit.\n",
                    "flag": "-z",
                    "long": "--zero"
                },
                {
                    "name": "--version",
                    "content": "Show the version and exit.\n",
                    "long": "--version"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "DPKGROOT\nIf set and the --instdir or --root options have not been specified, it will be used as\nthe filesystem root directory.\n\nDPKGCOLORS\nSets the color mode.  The currently accepted values are: auto (default), always and\nnever.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "realpath(1), readlink(1).\n\n\n\n1.21.1                                       2025-09-09                             dpkg-realpath(1)",
            "subsections": []
        }
    },
    "summary": "dpkg-realpath - print the resolved pathname with DPKGROOT support",
    "flags": [
        {
            "flag": "-z",
            "long": "--zero",
            "arg": null,
            "description": "Use a NUL byte to end output lines instead of a new line character (since dpkg 1.20.6). --instdir directory --root directory Set the root directory to directory, which is the base directory that pathnames get canonicalized against. Defaults to «/». -?, --help Show the usage message and exit."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Show the version and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "realpath",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/realpath/1/json"
        },
        {
            "name": "readlink",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/readlink/1/json"
        }
    ]
}