The documentation for Debian and the dpkg package managment system explains the debian/control files are meta data for packages, e.g. these docs explain:

The control file contains the information that the package manager (such as apt-get, synaptic, and adept) uses, build-time dependencies, maintainer information, and much more.

On ubuntu the file /var/lib/dpkg/status contains the contents of installed packages control files, but when ever I have extracted packages I have never seen a control file in the package itself.
My understanding the APT/DPKG system that ubuntu and debian uses is that the apt-get update command will connect to all defined repositories and pull down a package.gz file for each repo.
In that case does the data defined in each packages control file get stored in the package.gz so that it is available to the apt-cache system - rather than directly to dpkg.
This makes sense to me because that would supply the meta data for a package to the apt-cache showpkg command without having to install the package.
If this is not the case then where are the debian control files stored?

  • Isn't it in the .deb file itself in file named control.tar.gz? – user140866 Feb 3 '16 at 2:54
  • @siblynx Ive never seen it, can you give an example of a package that has it? – the_velour_fog Feb 3 '16 at 2:56
  • Each .deb usually contains two files: data.tar.gz (actual package contents) and control.tar.gz, which contains file control with information you mentioned. It also contains file debian-binary, it's probably a version number of .deb file format. I don't know which tool you've used to unpack .deb files, but I recomment you to start with ar, because each .deb is a simple ar archive. – user140866 Feb 3 '16 at 2:59
  • For example, I downloaded libc6 from ftp.us.debian.org/debian/pool/main/g/glibc/…, now I list it's contents: ar t libc6_2.19-18+deb8u2_i386.deb which displays: debian-binary control.tar.gz data.tar.gz – user140866 Feb 3 '16 at 3:02
  • thanks @siblynx ! I was was using dpkg -x <package> to extract - and for some reason it was stripping all the important files out during the extraction - ar shows the true state of affairs ! – the_velour_fog Feb 3 '16 at 3:30

The format of the .deb packages is documented in the deb(5) man page.

You can also see the control information for a .deb with dpkg-deb -I archive.deb or dpkg-deb -f archive.deb.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.