0

It's possible to view the Package-List of a debian/ubuntu package, using the package management tools like apt, aptitude or dpkg?

I need to list the packages provided by a package, the list is visible in the dsc file:

Example: http://archive.ubuntu.com/ubuntu/pool/main/l/lxc/lxc_1.0.0~beta3-0ubuntu1.dsc Section Package-List.

  • 2
    See wiki.debian.org/dsc . A short answer is that you can not generate a .dsc file from a binary .deb package. A somewhat longer answer is that you can get information out of an installed package with dpkg-query(1) (see accompanied manual page and section for -f, --showformat especially). – Sami Laine Jan 28 '14 at 9:02
0

You can use apt-cache showsrc and use awk (or similar tools) to get the output you want:

$ apt-cache showsrc lxc | awk '/Package-List/{a=1;next}/^[^ ]/{a=0}a{print $1}'
lxc
lxc-dbg
lxc-dev

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.