I'm using my laptop sometimes behind a proxy and sometimes not. I've created an /etc/apt/apt.conf file, I've used it like that for the last 2 years:

  • when behind a proxy I add the line: Acquire::http::proxy "http://myproxy:8080/";

  • when I don't need proxy authentication, I remove or comment it out.

it worked so well like that, but now whenever I try to run any apt-get command it tries to connect to the proxy server, even with these lines commented out, or with apt.conf doesn't even exist.


Maybe your systemwide proxy is still on? Go to the "Network" dialog under "Settings", and ensure that the proxy is off.

As long as the systemwide setting is there, APT looks for a proxy.

Another thing you may want to try is running export http_proxy='' in bash before running aptget, and ensuring that you have Defaults keep_env http_proxy in sudo visudo before running apt-get

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.