Minimising downtime during apt-get upgrades

You could do something like this:

$ sudo aptitude -F%p --disable-columns search ~U | xargs -n 1 sudo apt-get install

or

$ sudo apt-get -s upgrade | awk '/^Inst/ { print $2 }' | xargs -n 1 sudo apt-get install

This will install each available upgrade individually.

Keep in mind that the above command doesn't take into account package dependencies, so you may end up with some steps installing more than one package. I'm not aware of a way to get aptitude or apt-get to output packages in order of their dependence on each other.

Tags:

Debian

Apt