How can apt query a package repo for the creation date of a package's files?

It is possible for apt to query a package repository for the creation dates for the files of a package , based on the package version as well?

Does it have the ability to do that whether or not the package is locally installed as well?

  • Why do you want to know the creation date? Oct 23, 2015 at 9:19
  • To compare it with other repos that provide the same packages
    – vfclists
    Oct 23, 2015 at 9:26
  • Isn't a package usually built once and then mirrored to all repositories? There shouldn't be a difference. Oct 23, 2015 at 9:28
  • By other repos I mean different package creators, not mirrors of the same repos. eg comparing something in a launchpad ppa with official debian packages.
    – vfclists
    Oct 23, 2015 at 9:56

1 Answer 1


I don't think you can query the repositories directly, but you could download the packages and then use

dpkg --contents <package.deb>

Which should list all the files in the package, including permissions, ownership and timestamps.

If you want to compare different packages, it might also be useful to compare the changelogs. There is apt-get changelog, but I am not sure if it is supported by all repositories.

  • 2
    +1. Note that dpkg/dpkg-deb internally calls tar -tv (the first tar in $PATH generally GNU tar) to list the files. When that is GNU tar, that output is missing the seconds (with other tar implementations, the time format is pretty useless and can also be affected by locales). dpkg also unsets the TAR_OPTIONS variable before calling tar so you can't pass --full-time that way. To get the seconds, you'd need to invoke it in an environment where tar is a wrapper script that calls GNU tar with --full-time. You'll want to use TZ=UTC0 as well for reliability. Oct 23, 2015 at 14:31

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.