DEBCHECKOUT(1)
π DEBCHECKOUT(1) β the debcheckout page, but make it make sense π
okay bestie, sit down, hydrate, and let me tell you about debcheckout β the little command from Debian Utilities that goes and fetches the development repository of a Debian package for you. no cap, it's the moment you stop downloading tarballs like it's 2009 and start living in the actual VCS. π¦
β¨ NAME β¨
debcheckout β checkout the development repository of a Debian package
π SYNOPSIS π
debcheckout [OPTIONS] PACKAGE [DESTDIR]
debcheckout [OPTIONS] REPOSITORY_URL [DESTDIR]
debcheckout --help
π§ DESCRIPTION π§
So here's the vibe. debcheckout goes and finds out which Version Control System maintains a given Debian package (that's your PACKAGE argument), and then it checks out the latest β potentially unreleased π β version of the package from its repository. by default it drops the checkout into a directory named after the PACKAGE, but you can override that by handing it a DESTDIR argument. iconic behavior honestly.
The tea on where the repository lives is expected to be found in the Vcs-* fields available in the source package record. for example, the vim package exposes that info with a field like Vcs-Hg: http://hg.debian.org/hg/pkg-vim/vim, and you can go look at it yourself by grepping through apt-cache showsrc vim. π
If there's more than one source package record floating around with Vcs-* fields, debcheckout will pick the record with the highest version number. alternatively, you can pick a specific version out of the ones available by writing the package name as PACKAGE=VERSION. slay, choices.
And if you already know the URL of the repository you want? you can just call debcheckout directly on it π
β but you'll probably need to pass the appropriate -t flag. that's because some heuristics are in use to guess the repository type from the URL, and if those heuristics flop, you'll want to override the guessed type with -t.
The version control systems supported rn are: Arch (arch), Bazaar (bzr), CVS (cvs), Darcs (darcs), Git (git), Mercurial (hg) and Subversion (svn). a whole roster. π
πΈ OPTIONS πΈ
π GENERAL OPTIONS π
-a,--authβ work in authenticated mode, bestie. what that means: for known repositories (mainly the ones hosted onhttps://salsa.debian.org) it attempts URL rewriting before checking out, so that you can actually commit to the thing. for example, for Git repositories hosted on Salsa this meansgit@salsa.debian.org:...gitgets used instead ofhttps://salsa.debian.org/...git. there are built-in rules forsalsa.debian.organdgithub.com, and other hosts can be configured usingDEBCHECKOUT_AUTH_URLS.-d,--detailsβ only print a list of detailed info about the package repository, no checkout. 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. heads up: this action might need a network connection to the remote repository. π«Ά also see-pβ this option and-pare mutually exclusive.-h,--helpβ print a detailed help message and exit. the classic.-p,--printβ only print a summary about package repository info, no checkout. output format is TAB-separated with two fields: repository type, repository URL. this one works offline β¨ β it only uses "static" information as known by APT's cache. also see-d. this option and-dare mutually exclusive.-Ppackage,--packagepackage β when you're checking out a repository URL, instead of trying to guess the package name from the URL, just use this package name. no guessing games.-tTYPE,--typeTYPE β override the repository type. (it defaults to some heuristics based on the URL or, if the heuristics fail, to the fallback"git".) should be one of the currently supported repository types.-uUSERNAME,--userUSERNAME β specify the login name to be used in authenticated mode (see-a). this option implies-a, so you don't need to specify both. one and done.-fFILE,--fileFILE β 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 put thedebiandirectory in version control (rude, but okay).debcheckoutcan retrieve the remaining parts of the source usingapt-get sourceand move the files into the checkout. the values:neverβ only use the repository.auto(default) β if the repository only contains thedebiandirectory, retrieve the source package, unpack it, and also place the.orig.tar.gzfile into the current directory. else, do nothing.download-onlyβ always retrieve the.orig.tar.gzfile, but do not unpack it.alwaysβ always retrieve the.orig.tar.gzfile, and if the repository only contains thedebiandirectory, unpack it.
π οΈ VCS-SPECIFIC OPTIONS π οΈ
π» GIT-SPECIFIC OPTIONS π»
--git-trackBRANCHES β specify a list of remote branches which will be set up for tracking (as ingit branch --track, seegit-branch(1)) after the remote Git repository has been cloned. the list should be given as a space-separated list of branch names. and as a shorthand, the string"*"can be given to require tracking of all remote branches. lowkey the best shorthand in the game.
π CONFIGURATION VARIABLES π
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order to set configuration variables. command line options can be used to override configuration file settings. environment variable settings are ignored for this purpose. π the currently recognised variables are:
DEBCHECKOUT_AUTH_URLSβ this variable should be a space separated list of Perl regular expressions and replacement texts, which must come in pairs:REGEXP TEXT REGEXP TEXT ...and so on. each pair denotes a substitution which is applied to repository URLs if other built-in means of building URLs for authenticated mode (see-a) have failed.
References to matching substrings in the replacement texts are allowed as usual in Perl by the means of $1, $2, ... and so on.
This setting is used to configure the "authenticated mode" location for repositories. the Debian repositories on salsa.debian.org are implicitly defined, as is github.com.
Here's a sample snippet suitable for the configuration files:
DEBCHECKOUT_AUTH_URLS='
^\w+://(svn\.example\.com)/(.*) svn+ssh://$1/srv/svn/$2
^\w+://(git\.example\.com)/(.*) git+ssh://$1/home/git/$2
'
note that whitespace is not allowed in either regexps or replacement texts. also, since configuration files are sourced by a shell, you probably want to use single quotes around the value of this variable. π
DEBCHECKOUT_SOURCEβ this variable determines under what scenarios the associatedorig.tar.gzfor a package will be downloaded. see the--sourceoption for a description of the values.DEBCHECKOUT_USERβ this variable sets the username for authenticated mode. it can be overridden with the--useroption. setting this variable does not imply the use of authenticated mode β it still has to be activated with--auth. the way that's a two-step thing, fr fr.
π SEE ALSO π
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.
βοΈ AUTHOR βοΈ
debcheckout and this manpage have been written by Stefano Zacchiroli <zack@debian.org>. thank you for your service, king π«‘
and that's the whole page, bestie β go forth and check out some repositories. π β¨
Debian Utilities Β· 2026-09-21 Β· DEBCHECKOUT(1) β mwah, love u, bye ππ¦π
π¦ where this page comes from
- ubuntu stonking: devscripts 2.26.11ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms