Is there an easy way to determine the "Archive", "Suite", "origin" (or whatever else APT uses) just from the deb line?

For example, someone (trusted, of course) gives me this deb line:

deb http://myrepo.example.org/debian/ wheezy main contrib non-free whatever

I add it to sources.list, resolve GPG issue, update, install the packages and I'm almost good to go. Almost, because I'd like to achieve unattended upgrades as well. So I open /etc/apt/apt.conf.d/50unattended-upgrades, and behold:

// Automatically upgrade packages from these origin patterns
Unattended-Upgrade::Origins-Pattern {
        // Archive or Suite based matching:
        // Note that this will silently match a different release after
        // migration to the specified archive (e.g. testing becomes the
        // new stable).
//      "o=Debian,a=stable";
//      "o=Debian,a=stable-updates";
//      "o=Debian,a=proposed-updates";

they want me to use "Archive or Suite based matching".


  • how can I compose/retrieve the necessary information for the pattern?

  • And can I do it prior to adding the line to sources.list (just out of curiosity)?

  • What about deb ftp:// (not sure if it's used) or deb-src?

  • Is there a "plumbing" utility for that?

Note that I'm looking for general explanation of repo structure and the way deb line is read, rather than just URI for current official Debian repo.

1 Answer 1


You can find the information in the Release file of the repository:

For example for the default Debian repository : http://ftp.debian.org/debian/dists/wheezy/main/binary-i386/Release

Archive: stable
Origin: Debian
Label: Debian
Version: 7.2
Component: main
Architecture: i386

Some information can also be found in the main Release file: http://ftp.debian.org/debian/dists/stable/Release

For more information about repositories, see https://wiki.debian.org/RepositoryFormat

  • ...so how do I get the URI from the deb line? Is it safe to assume the "dists/stable/main/binary-i386/Release" part, even for non-official repo? I was looking for more general explanation on the syntax, if that can be done... Oct 21, 2013 at 13:23
  • This should work for directory-based repositories. Of course, you need to adapt the complete URL according to the other parameters. It can also be binary-all or the architecture you used (amd64, ...). The parameter after the URL is the distribution (wheezy, stable, ...), the following parameters are the part of the repo (main, non-free, contrib ...). Please note that there is also flat repositories, where all files can be found directly at the URL.
    – jofel
    Oct 21, 2013 at 13:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .