{
    "content": [
        {
            "type": "text",
            "text": "# debcheckout (man)\n\n## NAME\n\ndebcheckout - checkout the development repository of a Debian package\n\n## SYNOPSIS\n\ndebcheckout [OPTIONS] PACKAGE [DESTDIR]\ndebcheckout [OPTIONS] REPOSITORYURL [DESTDIR]\n\n## DESCRIPTION\n\ndebcheckout retrieves the information about the Version Control System used to maintain a\ngiven Debian package (the PACKAGE argument), and then checks out the latest (potentially\nunreleased) version of the package from its repository.  By default the repository is checked\nout to the PACKAGE directory; this can be overridden by providing the DESTDIR argument.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION**\n- **OPTIONS** (9 subsections)\n- **CONFIGURATION VARIABLES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "debcheckout",
        "section": "",
        "mode": "man",
        "summary": "debcheckout - checkout the development repository of a Debian package",
        "synopsis": "debcheckout [OPTIONS] PACKAGE [DESTDIR]\ndebcheckout [OPTIONS] REPOSITORYURL [DESTDIR]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-a",
                "long": "--auth",
                "arg": null,
                "description": "Work in authenticated mode; this means that for known repositories (mainly those hosted on https://salsa.debian.org) URL rewriting is attempted before checking out, to ensure that the repository can be committed to. For example, for Git repositories hosted on Salsa this means that git@salsa.debian.org:...git will be used instead of https://salsa.debian.org/...git. There are built-in rules for salsa.debian.org, alioth.debian.org and github.com. Other hosts can be configured using DEBCHECKOUTAUTHURLS."
            },
            {
                "flag": "-d",
                "long": "--details",
                "arg": null,
                "description": "Only print a list of detailed information about the package repository, without checking it out; the output format is a list of fields, each field being a pair of TAB-separated field name and field value. The actual fields depend on the repository type. This action might require a network connection to the remote repository. Also see -p. This option and -p are mutually exclusive."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Print a detailed help message and exit."
            },
            {
                "flag": "-p",
                "long": "--print",
                "arg": null,
                "description": "Only print a summary about package repository information, without checking it out; the output format is TAB-separated with two fields: repository type, repository URL. This action works offline, it only uses \"static\" information as known by APT's cache. Also see -d. This option and -d are mutually exclusive."
            },
            {
                "flag": "-P",
                "long": "--package",
                "arg": null,
                "description": "When checking out a repository URL, instead of trying to guess the package name from the URL, use this package name."
            },
            {
                "flag": "-t",
                "long": "--type",
                "arg": null,
                "description": "Override the repository type (which defaults to some heuristics based on the URL or, in case of heuristic failure, the fallback \"git\"); should be one of the currently supported repository types."
            },
            {
                "flag": "-u",
                "long": "--user",
                "arg": null,
                "description": "Specify the login name to be used in authenticated mode (see -a). This option implies -a: you don't need to specify both."
            },
            {
                "flag": "-f",
                "long": "--file",
                "arg": null,
                "description": "Specify that the named file should be extracted from the repository and placed in the destination directory. May be used more than once to extract multiple files. --source=never|auto|download-only|always Some packages only place the debian directory in version control. debcheckout can retrieve the remaining parts of the source using apt-get source and move the files into the checkout. never Only use the repository."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "apt-cache",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/apt-cache/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "debcheckout --help",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-a --auth",
                        "lines": 9,
                        "flag": "-a",
                        "long": "--auth"
                    },
                    {
                        "name": "-d --details",
                        "lines": 7,
                        "flag": "-d",
                        "long": "--details"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-p --print",
                        "lines": 6,
                        "flag": "-p",
                        "long": "--print"
                    },
                    {
                        "name": "-P --package",
                        "lines": 3,
                        "flag": "-P",
                        "long": "--package"
                    },
                    {
                        "name": "-t --type",
                        "lines": 4,
                        "flag": "-t",
                        "long": "--type"
                    },
                    {
                        "name": "-u --user",
                        "lines": 3,
                        "flag": "-u",
                        "long": "--user"
                    },
                    {
                        "name": "-f --file",
                        "lines": 11,
                        "flag": "-f",
                        "long": "--file"
                    },
                    {
                        "name": "auto (default)",
                        "lines": 22
                    }
                ]
            },
            {
                "name": "CONFIGURATION VARIABLES",
                "lines": 37,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "debcheckout - checkout the development repository of a Debian package\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "debcheckout [OPTIONS] PACKAGE [DESTDIR]\ndebcheckout [OPTIONS] REPOSITORYURL [DESTDIR]",
                "subsections": [
                    {
                        "name": "debcheckout --help",
                        "content": ""
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "debcheckout retrieves the information about the Version Control System used to maintain a\ngiven Debian package (the PACKAGE argument), and then checks out the latest (potentially\nunreleased) version of the package from its repository.  By default the repository is checked\nout to the PACKAGE directory; this can be overridden by providing the DESTDIR argument.\n\nThe information about where the repository is available is expected to be found in Vcs-*\nfields available in the source package record. For example, the vim package exposes such\ninformation with a field like Vcs-Hg:  http://hg.debian.org/hg/pkg-vim/vim, you can see it by\ngrepping through apt-cache showsrc vim.\n\nIf more than one source package record containing Vcs-* fields is available, debcheckout will\nselect the record with the highest version number.  Alternatively, a particular version may\nbe selected from those available by specifying the package name as PACKAGE=VERSION.\n\nIf you already know the URL of a given repository you can invoke debcheckout directly on it,\nbut you will probably need to pass the appropriate -t flag. That is, some heuristics are in\nuse to guess the repository type from the URL; if they fail, you might want to override the\nguessed type using -t.\n\nThe currently supported version control systems are: Arch (arch), Bazaar (bzr), CVS (cvs),\nDarcs (darcs), Git (git), Mercurial (hg) and Subversion (svn).\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "GENERAL OPTIONS\n",
                "subsections": [
                    {
                        "name": "-a --auth",
                        "content": "Work in authenticated mode; this means that for known repositories (mainly those hosted\non https://salsa.debian.org) URL rewriting is attempted before checking out, to ensure\nthat the repository can be committed to. For example, for Git repositories hosted on\nSalsa this means that git@salsa.debian.org:...git will be used instead of\nhttps://salsa.debian.org/...git.\n\nThere are built-in rules for salsa.debian.org, alioth.debian.org and github.com. Other\nhosts can be configured using DEBCHECKOUTAUTHURLS.\n",
                        "flag": "-a",
                        "long": "--auth"
                    },
                    {
                        "name": "-d --details",
                        "content": "Only print a list of detailed information about the package repository, without checking\nit out; the output format is a list of fields, each field being a pair of TAB-separated\nfield name and field value. The actual fields depend on the repository type. This action\nmight require a network connection to the remote repository.\n\nAlso see -p. This option and -p are mutually exclusive.\n",
                        "flag": "-d",
                        "long": "--details"
                    },
                    {
                        "name": "-h --help",
                        "content": "Print a detailed help message and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-p --print",
                        "content": "Only print a summary about package repository information, without checking it out; the\noutput format is TAB-separated with two fields: repository type, repository URL. This\naction works offline, it only uses \"static\" information as known by APT's cache.\n\nAlso see -d. This option and -d are mutually exclusive.\n",
                        "flag": "-p",
                        "long": "--print"
                    },
                    {
                        "name": "-P --package",
                        "content": "When checking out a repository URL, instead of trying to guess the package name from the\nURL, use this package name.\n",
                        "flag": "-P",
                        "long": "--package"
                    },
                    {
                        "name": "-t --type",
                        "content": "Override the repository type (which defaults to some heuristics based on the URL or, in\ncase of heuristic failure, the fallback \"git\"); should be one of the currently supported\nrepository types.\n",
                        "flag": "-t",
                        "long": "--type"
                    },
                    {
                        "name": "-u --user",
                        "content": "Specify the login name to be used in authenticated mode (see -a). This option implies -a:\nyou don't need to specify both.\n",
                        "flag": "-u",
                        "long": "--user"
                    },
                    {
                        "name": "-f --file",
                        "content": "Specify that the named file should be extracted from the repository and placed in the\ndestination directory. May be used more than once to extract multiple files.\n\n--source=never|auto|download-only|always\nSome packages only place the debian directory in version control.  debcheckout can\nretrieve the remaining parts of the source using apt-get source and move the files into\nthe checkout.\n\nnever\nOnly use the repository.\n",
                        "flag": "-f",
                        "long": "--file"
                    },
                    {
                        "name": "auto (default)",
                        "content": "If the repository only contains the debian directory, retrieve the source package,\nunpack it, and also place the .orig.tar.gz file into the current directory. Else, do\nnothing.\n\ndownload-only\nAlways retrieve the .orig.tar.gz file, but do not unpack it.\n\nalways\nAlways retrieve the .orig.tar.gz file, and if the repository only contains the debian\ndirectory, unpack it.\n\nVCS-SPECIFIC OPTIONS\n\nGIT-SPECIFIC OPTIONS\n\n--git-track BRANCHES\nSpecify a list of remote branches which will be set up for tracking (as in\ngit  branch  --track, see git-branch(1)) after the remote Git repository has been cloned.\nThe list should be given as a space-separated list of branch names.\n\nAs a shorthand, the string \"*\" can be given to require tracking of all remote branches.\n"
                    }
                ]
            },
            "CONFIGURATION VARIABLES": {
                "content": "The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in\nthat order to set configuration variables. Command line options can be used to override\nconfiguration file settings. Environment variable settings are ignored for this purpose. The\ncurrently recognised variables are:\n\nDEBCHECKOUTAUTHURLS\nThis variable should be a space separated list of Perl regular expressions and\nreplacement texts, which must come in pairs: REGEXP TEXT REGEXP TEXT ... and so on. Each\npair denotes a substitution which is applied to repository URLs if other built-in means\nof building URLs for authenticated mode (see -a) have failed.\n\nReferences to matching substrings in the replacement texts are allowed as usual in Perl\nby the means of $1, $2, ... and so on.\n\nThis setting is used to configure the \"authenticated mode\" location for repositories. The\nDebian repositories on salsa.debian.org are implicitly defined, as is github.com.\n\nHere is a sample snippet suitable for the configuration files:\n\nDEBCHECKOUTAUTHURLS='\n^\\w+://(svn\\.example\\.com)/(.*)    svn+ssh://$1/srv/svn/$2\n^\\w+://(git\\.example\\.com)/(.*)    git+ssh://$1/home/git/$2\n'\n\nNote that whitespace is not allowed in either regexps or replacement texts. Also, given\nthat configuration files are sourced by a shell, you probably want to use single quotes\naround the value of this variable.\n\nDEBCHECKOUTSOURCE\nThis variable determines under what scenarios the associated orig.tar.gz for a package\nwill be downloaded.  See the --source option for a description of the values.\n\nDEBCHECKOUTUSER\nThis variable sets the username for authenticated mode. It can be overridden with the\n--user option. Setting this variable does not imply the use of authenticated mode, it\nstill has to be activated with --auth.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "apt-cache(8), Section 6.2.5 of the Debian Developer's Reference (for more information about\nVcs-* fields):\nhttps://www.debian.org/doc/developers-reference/best-pkging-practices.html#bpp-vcs.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "debcheckout and this manpage have been written by Stefano Zacchiroli <zack@debian.org>.\n\n\n\nDebian Utilities                             2026-03-04                               DEBCHECKOUT(1)",
                "subsections": []
            }
        }
    }
}