The structure of the entry is:
deb [arch=architecture] base-URL version repo-sections...
When you have a
deb [arch=amd64] http://apt.domain.de/ stable ubuntu
- base-URL is
- version codename is
- architecture is
- only one repository section
ubuntu is listed.
It indicates that the list of relevant binary packages is located at
and that the actual packages are (most likely) at
If the repository contains a large number of packages, it may have been split into a number of sub-directories under the second URL:
- named with a single character, matching the initial character in the names of packages contained within
- named as
X is a single character, containing library packages whose name without the
lib prefix begins with the same character (i.e.
If there is a really large number of packages in the repository, there may be further sub-divisions.
So, if you were looking for package "foo", you would first download the file
http://apt.domain.de/dists/stable/ubuntu/binary-amd64/Packages.xz, and read it to find out which version of that package is considered to be current in the
ubuntu section of the
stable version of that repository.
You would find something like this:
Source: foo (1.2.3-4)
Maintainer: The Developer Guy <firstname.lastname@example.org>
Depends: libfoo (>= 1.2.3-4+b1)
From this, you would know:
that the relevant package is
that it depends on package
1.2.3-4+b1 or greater
and that the package can be found at:
You could then download the package to a temporary directory and start extracting it:
ar x foo_1.2.3-4+b1_amd64.deb
This will give you three files:
debian-binary. The last of those contains just a version number of the package format, and can usually be ignored.
data.tar.xz contains the actual files that the package would install.
control.tar.xz contains any pre/post install/remove scripts if the package requires them, and some metadata for the package manager.