Ubuntu 16.04 apt-get - Could not resolve 'proxy_server'

13,973

Solution 1

It looks like you have inherited the information from the DHCP server.

Check the APT file (you have already done it) under /etc/apt/apt.conf and remove any Acquire::XXX::proxy where XXX is http/ https / ftp

In addition to this, check /etc/environment for proxy information.

Last but not least, try to renew your DHCP information, it can eventually help: sudo dhclient -r

One last word, are you using the same BASH shell process you were using at the university or you opened a new one? Because, it could have cached information.

Solution 2

This worked for me :

go to /etc/apt/apt.conf.d

using :

cd /etc/apt/apt.conf.d

then check the files available there using :

ls

goto the proxy file: would have a name like 40proxy or 10proxy etc

open it using:

sudo gedit

now

delete all content and save it.

Share:
13,973
therealanshuman
Author by

therealanshuman

Updated on June 15, 2022

Comments

  • therealanshuman
    therealanshuman over 1 year

    Earlier, I was at my university and accessing the internet through a proxy server i.e. proxy.iiit.ac.in. But, currently I am trying to run sudo apt-get update from my home internet (which as no proxy server) and I am getting the following error message.

    enter image description here

    I have removed the system and terminal proxies, and I have also removed proxies from apt.conf in /etc/apt/. What is it that's still causing the problem?