Page 1 of 1

Automate the apt-get installs

Posted: Tue Oct 14, 2014 11:45 am
by lilzz
I have whole bunch of
apt-get install A
apt-get install B
apt-get install C

.....


Is there way to automate this? many of them have prompt user [Y/N].
Can I force them all Yes. Write a script automatically do many apt-get installs?

Re: Automate the apt-get installs

Posted: Tue Oct 14, 2014 11:47 am
by RaTTuS
sudo apt-get install package-a package-b package-c -y

Re: Automate the apt-get installs

Posted: Tue Oct 14, 2014 11:49 am
by DougieLawson
You may be able to use unattended upgrades.

http://serverfault.com/questions/22324/ ... nny-stable

Re: Automate the apt-get installs

Posted: Tue Oct 14, 2014 3:24 pm
by plugwash
You can install multiple packages on one line.

Apt has various options to reduce/eliminate interactivity, of course using them comes at some risk

--trivial-only
This will make the command only succeed if it would have run without a prompt, otherwise it fails.

--assume-yes (or -y)
this will make the command assume yes to most prompts but it will abort on some of the scarier ones (it still carries a risk of damage though)

--force-yes
should be pretty self explanatory.

Re: Automate the apt-get installs

Posted: Tue Oct 14, 2014 3:58 pm
by fruitoftheloom