3

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.

6
xargs -rxa files_to_install.txt -- sudo apt-get install --

will work.

6
  • I would suggest $(< files_to_install.txt)
    – enzotib
    Oct 18 '11 at 15:38
  • @enzotib Out of curiosity, why is that better? Oct 19 '11 at 4:47
  • 1
    @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
  • 1
    Thx for your answer. on a ubuntu 14.04, I get the folloing error: Argument list too long. Any ideas, why?
    – toesslab
    Nov 21 '14 at 16:58
  • @toesslab.ch: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks. Oct 22 '18 at 10:11
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.