1

I have a list of packages I would like to install on a fresh Ubuntu. Since those is a quite old list, I would like so see the outcome, If I would replace the suggestions automatically.

So all packages that are referenced to a newer other package shoud be auto-resolved and missing packages should be auto ignored.

Is there such an option like apt-get install --fix-all

Then I could install it with

url=https://gist.githubusercontent.com/rubo77/bd9183fe2794467f482c/raw/5342531410a31513f827a2b8050e569e57870b66/gistfile1.txt
echo $(wget $url -qO -|xargs) > /tmp/pkglist
sudo apt-get install $(cat /tmp/pkglist)
0

Use aptitude instead of apt-get. Aptitude, unlike dpkg and apt-get continues while ignoring errors. It still prints them but it continues.

I do this all the time myself for re-installing Ubuntu.

The command to use would be:

sudo aptitude update && cat pkglist | xargs sudo aptitude install

All you would have to do is replace cat pkglist with your wget command.

1

You can use dpkg to install the list of packages.

First, you need to set the list of selected packages.

sudo dpkg --set-selections < filename

where filename is the name of the file which contains the list of packages.

Then, update and install.

sudo apt-get update
sudo apt-get dselect-upgrade

This method only adds and upgrades packages, it will not remove packages that do not exist in the list.

  • That gives a lot of errors. And the question is about these. Try it with my list – rubo77 Nov 11 '14 at 10:22
  • Can you mention or post the errors that you are getting? – user347616 Nov 11 '14 at 10:28
  • The same you would get. Many of those packages don't exist any more – rubo77 Nov 11 '14 at 12:07

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.