ORIGTARGZ(1)
π ORIGTARGZ π
okay bestie, so there's this little icon called origtargz and she's about to be your whole personality. She grabs the orig tarball of a Debian package from a bunch of different places and then unpacks it for you. No cap, she's the moment.
β¨ SYNOPSIS β¨
origtargz [OPTIONS] [--unpack[=no|once|yes]]
origtargz --help
π¦ DESCRIPTION π¦
So origtargz downloads the orig tarball of a Debian package, and also unpacks it into the current directory β but only if that directory just contains a debian directory. π
Her main character use case is with debian-dir-only repository checkouts, but lowkey she's also just a really useful general tarball download wrapper. The version number of the tarball she's gonna download? Determined from debian/changelog, obviously. And you should invoke her from the top level directory of an unpacked Debian source package. Periodt.
Here's the vibe check on where she looks for that tarball, in order:
- First, an existing file is looked for.
- Directories given with
--pathare searched. pristine-taris tried.pristine-lfsis tried.apt-get sourceis tried whenapt-cache showsrcreports a matching version.- Finally,
uscan --download --download-current-versionis tried.
Now. When she's asked to unpack the orig tarball, origtargz will remove all files and directories from the current directory, except the debian directory and the VCS repository directories. π She is not playing around.
β οΈ Heads up fr fr: this will drop all non-committed changes for the patch system you're using (e.g. source format3.0 (quilt)), and will even remove all patches from the package when no patch system is in use (that's the original1.0source format). RIP to your uncommitted work, bestie. π
Some VCS control files outside debian/ are preserved though β .bzr-builddeb, .bzr-ignore, .gitignore, .hgignore β if they're stored in VCS. π«Ά
And the default behavior? She unpacks the orig tarball if the current directory is empty except for a debian directory and the VCS files mentioned above. Iconic.
π NOTES π
Despite the whole "targz" name situation, she will work with any compression scheme used for the tarball. The name is giving what it's giving, but the functionality is built different. π
A similar tool for unpacking orig tarballs is uupdate(1). That one creates a new working directory, unpacks the tarball, and applies the Debian .diff.gz changes. In contrast, origtargz uses the current directory, keeping VCS metadata. Different energy, both valid.
For Debian package repositories that keep the full upstream source, other tools should be used to upgrade the repository from the new tarball. See gbp-import-orig(1) and svn-upgrade(1) for examples. origtargz is still useful for downloading the current tarball though. Slay. π
π OPTIONS π
-p,--pathdirectory β Add directory to the list of locations to search for an existing tarball. When found, a hardlink is created if possible, otherwise a symlink. β¨-u,--unpack[=no|once|yes]β Unpack the downloaded orig tarball to the current directory, replacing everything except the debian directory. Existing files are removed, except fordebian/and VCS files. Preserved are:.bzr,.bzrignore,.bzr-builddeb,.git,.gitignore,.hg,.hgignore,_darcsand.svn.noβ Do not unpack the orig tarball.once(default when--unpackis not used) β If the current directory contains only a debian directory (and possibly some dotfiles), unpack the orig tarball. This is the default behavior.yes(default for--unpackwithout argument) β Always unpack the orig tarball. Go off. π₯
-d,--download-onlyβ Alias for--unpack=no. Simple, clean, lowkey.-t,--tar-onlyβ When usingapt-get source, pass--tar-onlyto it. The default is to download the full source package including.dscand.diff.gzor.debian.tar.gzcomponents sodebdiffcan be used to diff the last upload to the next one. With--tar-only, only download the.orig.tar.*file. πΈ--cleanβ Remove existing files as with--unpack.
β οΈ Note that like --unpack, this will remove upstream files even if they are stored in VCS. Yeah. She said what she said. π
π SEE ALSO π
debcheckout(1), gbp-import-orig(1), pristine-tar(1), svn-upgrade(1), uupdate(1)
π AUTHOR π
origtargz and this manpage have been written by Christoph Berg <myon@debian.org>. We love a legend. π«Ά
and that's the whole thing bestie!! π this page is from Debian Utilities, dated 2026-09-21 β mwah, no notes, go download some tarballs. πβ¨π
π¦ 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