#!/bin/bash -eux

# set a fast, german mirror
sed -ie 's,http://us.archive.ubuntu.com/ubuntu/,http://ubuntu.mirror.lrz.de/ubuntu/,g' /etc/apt/sources.list
sed -ie 's,http://security.ubuntu.com/ubuntu,http://ubuntu.mirror.lrz.de/ubuntu/,g' /etc/apt/sources.list

apt-get update
apt-get -y upgrade

#!/bin/bash -eux

# set a fast, german mirror
sed -ie 's,[a-z.]*archive.ubuntu.com,ubuntu.mirror.lrz.de,g' /etc/apt/sources.list
sed -ie 's,security.ubuntu.com,ubuntu.mirror.lrz.de,g' /etc/apt/sources.list

apt-get update
apt-get -y upgrade

Replace Ubuntu archive mirror for every country
Replace Ubuntu archive mirror for every country