Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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