Ubuntu – How to apt-get install multiple packages without stopping (if not found)

aptbashpackage-management

I am making a bash script that installs various packages using apt-get install. However, I notice that if there is a line that says:

sudo apt-get install package1 package2 package3

and either of the packages is not found, none of the others will be installed. How do I make it keep going even if it can't find one of the packages?

Thanks in advance.

Best Answer

I suggest an apt-get option

sudo apt-get --ignore-missing install $list_of_packages

but be aware that missing dependences cannot be ignored, and even if you use --force you can get a broken system.

Related Question