This worked
Sample Error:
Err:70 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages 503 Service Unavailable [IP: 91.189.88.161 80]
Refer: https://askubuntu.com/questions/26528/error-503-service-unavailable-when-using-apt-get-update-behind-proxy
$ sudo su -
$ echo 'Acquire { http::User-Agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"; };' >> /etc/apt/apt.conf
You could also just update the apt.conf file in place instead of using the echo command.
In case you cannot update from a repository, you can select the best mirror possible.
Ideas to try:
- Get keys manually - http://redcrackle.com/blog/how-add-ubuntu-apt-get-key-behind-firewall
- Adding a repository to use port 80 - https://gist.github.com/maciakl/4531580

