Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
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 at 9:02

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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