debcheckout — checkout the development repository of a Debian package
| Use Case | Command | Description |
|---|---|---|
| 📥 Checkout package repository | debcheckout <package> | Checkout the development repository of a Debian package |
| 📂 Checkout to custom directory | debcheckout <package> <destdir> | Checkout repository to a specified destination directory |
| 🖨️ Print repository info | debcheckout --print <package> | Display repository type and URL without checkout (offline) |
| 📋 Show detailed info | debcheckout --details <package> | Show detailed repository information (may require network) |
| 🔐 Authenticated checkout | debcheckout --auth <package> | Checkout with write access (e.g., salsa.debian.org) |
| 🏷️ Specify repository type | debcheckout --type <type> <url> | Checkout specifying the VCS type (git, bzr, svn, hg, etc.) |
| 📄 Extract a file | debcheckout --file <file> <package> | Extract a specific file from the repository |
| ❓ Get help | debcheckout --help | Display detailed help message and exit |
debcheckout [OPTIONS] PACKAGE [DESTDIR]
debcheckout [OPTIONS] REPOSITORY_URL [DESTDIR]
debcheckout --help
debcheckout retrieves the information about the Version Control System used to maintain a given Debian package (the PACKAGE argument), and then checks out the latest (potentially unreleased) version of the package from its repository. By default the repository is checked out to the PACKAGE directory; this can be overridden by providing the DESTDIR argument.
The information about where the repository is available is expected to be found in Vcs-* fields available in the source package record. For example, the vim package exposes such information with a field like Vcs-Hg: http://hg.debian.org/hg/pkg-vim/vim. You can see it by grepping through apt-cache showsrc vim.
If more than one source package record containing Vcs-* fields is available, debcheckout will select the record with the highest version number. Alternatively, a particular version may be selected from those available by specifying the package name as PACKAGE=VERSION.
If you already know the URL of a given repository you can invoke debcheckout directly on it, but you will probably need to pass the appropriate -t flag. Some heuristics are in use to guess the repository type from the URL; if they fail, you might want to override the guessed type using -t.
The currently supported version control systems are: Arch (arch), Bazaar (bzr), CVS (cvs), Darcs (darcs), Git (git), Mercurial (hg) and Subversion (svn).
-a, --auth — 🔐 Work in authenticated mode. For known repositories (mainly https://salsa.debian.org), URL rewriting is attempted before checkout to ensure the repository can be committed to. For Git repositories on Salsa, git@salsa.org:...git is used instead of https://salsa.debian.org/...git. Built-in rules exist for salsa.debian.org, alioth.debian.org and github.com. Other hosts can be configured via DEBCHECKOUT_AUTH_URLS.-d, --details — 📋 Only print detailed information about the package repository without checking it out. Output is a list of TAB-separated field name/value pairs. May require a network connection. Mutually exclusive with -p.-h, --help — ❓ Print a detailed help message and exit.-p, --print — 🖨️ Only print a summary about the package repository (type, URL) without checking it out. Output is TAB-separated with two fields. Works offline using APT's cache. Mutually exclusive with -d.-P <package>, --package <package> — 📦 When checking out a repository URL, use this package name instead of guessing from the URL.-t <TYPE>, --type <TYPE> — 🏷️ Override the repository type (defaults to heuristics based on URL, fallback "git"). Should be one of the supported types.-u <USERNAME>, --user <USERNAME> — 👤 Specify the login name for authenticated mode. Implies -a.-f <FILE>, --file <FILE> — 📄 Extract the named file from the repository and place it in the destination directory. May be used multiple times.--source=never|auto|download-only|always — 📦 Source retrieval behavior for packages that only contain the debian directory in version control.
never — Only use the repository.auto (default) — If the repository only contains the debian directory, retrieve the source package, unpack it, and place the .orig.tar.gz file in the current directory. Else, do nothing.download-only — Always retrieve the .orig.tar.gz file, but do not unpack it.always — Always retrieve the .orig.tar.gz file, and if the repository only contains the debian directory, unpack it.--git-track <BRANCHES> — 🌿 Specify a space-separated list of remote branches to set up for tracking (as in git branch --track, see git-branch(1)) after cloning. The string "*" can be given to track all remote branches.The configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order. Command line options override configuration file settings. Environment variable settings are ignored.
DEBCHECKOUT_AUTH_URLS — 🔐 Space-separated list of Perl regular expression / replacement text pairs (REGEXP TEXT REGEXP TEXT ...). Each pair denotes a substitution applied to repository URLs when built-in authenticated mode rules fail. References to matching substrings ($1, $2, ...) are allowed. Example:
DEBCHECKOUT_AUTH_URLS='
^\w+://(svn\.example\.com)/(.*) svn+ssh://$1/srv/svn/$2
^\w+://(git\.example\.com)/(.*) git+ssh://$1/home/git/$2
'
Note: whitespace is not allowed in regexps or replacement texts. Use single quotes around the value.DEBCHECKOUT_SOURCE — 📦 Determines when to download the associated .orig.tar.gz for a package. See the --source option for values.DEBCHECKOUT_USER — 👤 Sets the username for authenticated mode. Overridable with --user. Setting this variable does not activate authenticated mode; use --auth for that.apt-cache(8), Section 6.2.5 of the Debian Developer's Reference (for more information about Vcs-* fields): https://www.debian.org/doc/developers-reference/best-pkging-practices.html#bpp-vcs.
debcheckout and this manpage have been written by Stefano Zacchiroli <zack@debian.org>.
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-31 20:16 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)