Ubuntu: Install a list of packages and replace all errors


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)  


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.


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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »