
dget: Download Debian packages
What is dget?
dget is a small utility for downloading Debian packages, either as binary packages or as sources described by a .dsc file. It’s handy when you want to grab a package without setting up apt sources or building from source manually.
Quick start
- Download a binary package:
dget {{package}}
- Download and extract a package source from its .dsc file:
dget {{http://deb.debian.org/debian/pool/main/h/haskell-tldr/haskell-tldr_0.4.0-2.dsc}}
- Download a package source tarball from its .dsc file but don’t extract it:
dget {{[-d|--download-only]}} {{http://deb.debian.org/debian/pool/main/h/haskell-tldr/haskell-tldr_0.4.0-2.dsc}}
Note: The URL in the examples points to a real .dsc file; you can replace it with any valid Debian source descriptor.
How to use dget effectively
- Use dget when you want to quickly fetch a package file without configuring apt or other tools.
- For reproducible builds, prefer downloading the exact .dsc and the associated orig tarball, then build in a clean environment.
- If you only need the package’s binary, dget will place the file in your current directory; you can inspect it or install it with dpkg -i as a later step.
Common pitfalls
- dget does not automatically resolve dependencies. If you fetch a binary .deb, you may still need to install its dependencies with apt or dpkg.
- When downloading sources, make sure you trust the .dsc and the accompanying tarball. Verify checksums and signatures if possible.
- The —download-only option only saves the tarball (and .dsc) without extracting. If you expect an extraction, omit this flag.
Tips for beginners
- Start in a dedicated directory so downloaded files don’t clutter other work.
- If you see a 404 or network error, re-check the URL or try updating your tldr cache if you’re relying on tldr pages.
- Combine dget with other tools for automation, e.g., scripts that verify checksums after download.
See also
- tldr —update (to refresh cached tldr pages)
- dpkg -i (to install downloaded binary .deb files)
- debian.org resources for .dsc files and source packages
See Also
- How to Master the ipset Command for Efficient Firewall Management
- How to Use the man Command in Linux?
- How to Use the lsmod Command in Linux
- How to Use BWA Command for Efficient DNA Alignment
- trashy: Safe file deletion with Rust-based trash tool
- How Can You Master the tc Command for Effective Traffic Control in Linux?