//View Tip #825
Similar Tips
There are no more tips with these tags. Perhaps you'd like to submit one, or browse the archives.


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Sometimes you need to install a large amount of packages on a fresh installed system. Of course, you can install each of them manually or let a script do that but there is a much more comfortable way.

You need a file containing all packages you want to install - one package per line.

cat packages | xargs aptitude install

You can also perform this action with multiple files. This is needed when there are packages that need to be installed before other ones are installable.

for FILE in to_install/*; do
    echo Installing from $FILE
    cat $FILE | xargs aptitude install

You can prepend a number to the file names to ensure the installation order goes right.

View Comments »


Add your comment

Comments are currently disabled
I do believe
sudo aptitude install `cat packages`
also works
Posted 2009-06-04 12:22:09
cat to_install/* | xargs aptitude install works too.

daniel: did you try it with 10000 packages?
Posted 2009-07-16 14:16:52

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit