Logo

Disable Proxy When Using apt-get

Logo

I love apt-get: most of the world's open source software at ones fingertips! I use a Linux laptop for all my work, and I use it at work behind a proxy and at home connected directly to the Internet. I setup my apt.conf to look like this so that I can still use apt-get when I am in the office, behind a proxy.

Acquire::http::proxy "http://username:[email protected]:8080/";
Acquire::https::proxy "https://username:[email protected]:8080/";
Acquire::ftp::proxy "ftp://username:[email protected]:8080/";
Acquire::socks::proxy "socks://username:[email protected]:8080/";

Works perfectly when I'm at the office. Problem was that whenever I was at home I could't use apt-get any more. It always seemed to want to connect to the proxy, even if I blitzed that config file and removed all the entries. Various searches on the Internet didn't help, until I finally found this option.

Acquire::http::proxy=false

When I'm at home, I run apt-get thusly.

sudo apt-get -o Acquire::http::proxy=false install kgraphviewer

Originally published at chandrusoft.wordpress.com

Want to learn more?

Get in touch to discuss how we can help with your project.

Contact Us