A quick way to install associated -doc and -dev packages?

Asked by Paul Bransford

Is there any way to install all -doc packages that are associated with packages currently installed?

Also, would this same method work for pulling in -dev packages as well?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Paul Bransford
Solved:
Last query:
Last reply:
Revision history for this message
sasha (sasha123-deactivatedaccount) said :
#1

Hi,

Nice question ;)

Please try:

sudo su -

for i in `apt-cache search --names-only "\-dev$|\-doc$" | awk '{ print $1 }'`; do apt-get -y install $i

This trick should work

Revision history for this message
sasha (sasha123-deactivatedaccount) said :
#2

The trick above installs all avaible -dev and -doc packages in the system. I do not really know is it exactly what you need.

Revision history for this message
Paul Bransford (draeath) said :
#3

Yes, that is exactly what I was looking for! Thank you Alexander!

Revision history for this message
Paul Bransford (draeath) said :
#4

Oh, gotta tack "; done" to the end for it to actually go. I edited it to read "do echo apt-get -y install $i; done" to preview what it would do, and it is doing the trick! Thanks again Alexander!