Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sure I've seen instructions on how do do this unfortunately it was a few months ago and have forgotten them.

Thanks in advance to anyone who answers.

share|improve this question
up vote 5 down vote accepted

sudo apt-get install $(cat files_to_install.txt) will work.

share|improve this answer
I would suggest $(< files_to_install.txt) – enzotib Oct 18 '11 at 15:38
@enzotib Out of curiosity, why is that better? – Christopher Kyle Horton Oct 19 '11 at 4:47
@WarriorIng64: it is all done with bash, without using external process. It snould be a little bit more efficient – enzotib Oct 19 '11 at 5:41
Thx for your answer. on a ubuntu 14.04, I get the folloing error: Argument list too long. Any ideas, why? – Daenu Nov 21 '14 at 16:58

Assuming you are using Synaptic Package Manager, in your text file, you structure it in the following format:

where package name e.g. gimp would be a space or tabs can be install, remove, purge

And obviously put each package on a new line. No need to include dependencies.

Then in Synaptic, go to File > Read Markings and point it to your file. What this does is mark all the changes to be made and then you can proceed as usual. I have not tried @Jo-erlend's method but it definitely sounds simpler

share|improve this answer

Your Answer


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.