Tip #825 Install a large number of packages with aptitude
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 done
You can prepend a number to the file names to ensure the installation order goes right.
- TAGS:
- aptitude
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs