DGET(1)

πŸ’… DGET β€” like, the manual page, but make it cute

okay bestie sit DOWN because we're talking about dget, a lil tool from the Debian Utilities fam that's about to make your whole package-downloading life ✨effortless✨. it's in section 1 of the manual (you know, the user commands girlies) and it literally downloads Debian source and binary packages for you. no cap.


πŸ¦‹ NAME

dget β€” bad news for anyone still downloading source packages by hand: it downloads Debian source and binary packages. that's it, that's the name, slay.


🌸 SYNOPSIS

dget [options] URL ...
dget [options] [--all] package[=version] ...

two forms. two vibes. pick your fighter πŸ’–


✨ DESCRIPTION

so here's the tea. dget downloads Debian packages, and depending on which form you use, it does slightly different iconic things.

Form one (the URL one): dget fetches the URLs you asked for. and if that URL is a .dsc or .changes file, then dget switches into being a source-package aware form of wget β€” meaning it ALSO fetches every file referenced inside that .dsc/.changes file. 🫢 then the downloaded source gets checked with dscverify, and if that passes, it gets unpacked by dpkg-source. chef's kiss.

Form two (the package one): dget downloads a binary package (aka a .deb file, bestie) from the Debian mirror configured in /etc/apt/sources.list(.d). if you specify a version number, that specific version gets requested. and with --all, the list of all binaries for the source package package is extracted from the output of apt-cache showsrc package.

and in BOTH cases? dget can grab several packages and/or URLs at once. multitasking queen. πŸ‘‘

πŸ“’ side note, and this one matters: .udeb packages used by debian-installer live in separate packages files from .deb packages. so if you wanna use .udebs with dget, you're gonna need to have configured apt to use a packages file for component/debian-installer. noted.

okay now the smart part. before downloading files listed in .dsc and .changes files, and before downloading binary packages, dget checks whether any of these files already exist. if they do, their md5sums get compared so it doesn't re-download stuff unnecessarily. efficiency!! dget also looks for matching files in /var/cache/apt/archives and in the directories given by the --path option or specified in the configuration files (peep the config section below, bestie). and finally β€” if downloading (.orig).tar.gz or .diff.gz files fails, dget consults apt-get source --print-uris. the download backends used are curl and wget, looked for in that order. πŸŽ€

fun fact that's also a little bit of a read: dget package should be implemented in apt-get install -d.

dget was written to make it easier to retrieve source packages from the web to sponsor uploads, and thus the primary use case is downloading binary and source packages from a URL. so like, that's the main character energy right there. for fetching packages from apt repositories it's easier to simply run apt-get download package and apt-get source package β€” with optional --download-only so it doesn't uncompress it with dpkg-source automatically, or package=1.22-1 to define an exact version instead of just the latest version. πŸ’œ


πŸŽ€ OPTIONS πŸŽ€

every single one, no skipping, we don't do that here:

  • -a, --all β€” interpret package as a source package name, and download ALL the binaries as found in the output of apt-cache showsrc package. and if package is arch-qualified, then only binary packages which are "Arch: all", "Arch: any", or "Arch: $arch" will be downloaded. picky in the best way.
  • -b, --backup β€” move files that would be overwritten to ./backup. gentle, considerate, emotionally intelligent.
  • -q, --quiet β€” suppress wget/curl non-error output. shhh. 🀫
  • -d, --download-only β€” do NOT run dpkg-source -x on the downloaded source package. this can only be used with the first method of calling dget.
  • -x, --extract β€” run dpkg-source -x on the downloaded source package to unpack it. this option is the default, and it can only be used with the first method of calling dget.
  • -u, --allow-unauthenticated β€” do NOT attempt to verify the integrity of downloaded source packages using dscverify. (living dangerously, we love that for you)
  • --build β€” run dpkg-buildpackage -b -uc on the downloaded source package. it's giving "just build it already".
  • --path DIR[:DIR ...] β€” in addition to /var/cache/apt/archives, dget uses the colon-separated list given as argument to --path to find files with a matching md5sum. for example: "--path /srv/pbuilder/result:/home/cb/UploadQueue". if DIR is empty (i.e., "--path ''" is specified), then any previously listed directories or directories specified in the configuration files will be ignored. this option may be specified multiple times, and all of the directories listed will be searched β€” hence, the above example could have been written as: "--path /srv/pbuilder/result --path /home/cb/UploadQueue". flexible icon.
  • -k, --insecure β€” allow SSL connections to untrusted hosts. 😬 (it's your funeral, bestie, we support you)
  • --no-cache β€” bypass server-side HTTP caches by sending a Pragma: no-cache header. fresh out the oven, every time.
  • -h, --help β€” show a help message. πŸ₯°
  • -V, --version β€” show version information. πŸ’–

🌈 CONFIGURATION VARIABLES

so the two config 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. and heads up: environment variable settings are ignored for this purpose. πŸ™ˆ

the currently recognised variable is:

  • DGET_PATH β€” this can be set to a colon-separated list of directories in which to search for files, in addition to the default /var/cache/apt/archives. it has the same effect as the --path command line option. it is not set by default.
  • DGET_UNPACK β€” set to 'no' to disable extracting downloaded source packages. default is 'yes'.
  • DGET_VERIFY β€” set to 'no' to disable checking signatures of downloaded source packages. default is 'yes'.

⭐ EXAMPLES ⭐

one: download all binary .deb files for the current and previous version of a package, and compare them byte-for-byte with diffoscope. literally the coolest thing you'll do all week:

mkdir previous latest
(cd latest && dget --all mypackage=1.2-1)
(cd previous && dget --all mypackage) # download latest 1.2-2 in this example
diffoscope --html=diffoscope.html previous/ latest/

two: download the source package of the current version in the apt repository AND the to-be-reviewed new version at mentors.debian.net, then compare them with debdiff. sponsorship vibes ✨:

dget https://mentors.debian.net/debian/pool/main/m/mypackage/mypackage_1.2-3.dsc
apt-get source mypackage=1.2-2
debdiff --from mypackage_1.2-2.dsc --to mypackage_1.2-3.dsc

πŸ’€ BUGS AND COMPATIBILITY

  • dget --all srcpkg should be implemented in apt-get download srcpkg so apt-get could download all binary packages based on source package name. (key word: should.)
  • before devscripts version 2.10.17, the default was not to extract the downloaded source. set DGET_UNPACK=no to revert to the old behaviour. retro, but make it on purpose.

πŸ‘‘ AUTHOR

this program is Copyright (C) 2005-2013 by Christoph Berg <myon@debian.org>. modifications are Copyright (C) 2005-06 by Julian Gilbey <jdg@debian.org>.

this program is licensed under the terms of the GPL, either version 2 of the License, or (at your option) any later version. 🫢


πŸ”₯ SEE ALSO

apt-get(1), curl(1), debcheckout(1), debdiff(1), dpkg-source(1), wget(1)


and that's the whole thing bestie!! this beauty is from Debian Utilities, dated 2026-09-21, and it served absolute cunt in section 1 of the manual. go download some packages. periodt. πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from