Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I remove proxy from System/Network and apply it system wide it still remains when working in console. When I run:

env | grep proxy

it prints:


I could remove it with:

unset http_proxy
unset ftp_proxy
unset socks_proxy
unset https_proxy

but it's not permanent, when I reopen terminal these proxy variables are again setted.

How to remove them permanently?

share|improve this question
"When I remove proxy from System/Network" Do you mean emptying the text boxes or changing the dropdown menu to "none"? – jackweirdy Feb 3 '13 at 19:57
@jackweirdy, changing dropdown menu to none. – Иван Бишевац Feb 3 '13 at 21:46
up vote 2 down vote accepted

Be sure to change the method dropdown from "manual" to "none". This will erase everything - you may need to restart the machine after doing this.

share|improve this answer
You are right, it removes. Even better I don't need to restart computer, just to log off and then log on. – Иван Бишевац Feb 4 '13 at 22:05
Very handy. My proxy settings from Charles Proxy seemed to get "stuck" even after i closed the session and quit the program. I did this (using gsettings on the command line instead of the Network Manager proxy gui: gsettings set org.gnome.system.proxy mode 'none' , logged off and on and the http_proxy variable was unset for good. Thanks! – yuvilio Jan 28 '14 at 3:08

Make sure that those variables are not declared in any of the below files:

  • ~/.bashrc
  • /etc/bash.bashrc
  • /etc/environment

If they are, it'd be better if you remove those lines.

However, if you're unable to find them, then put the unset lines you've mentioned in your ~/.bashrc file.

share|improve this answer
You are right, they are in /etc/environment. I found solution for another problem I had with proxy. It's username and password for proxy. I couldn't use wget or ruby gem installing through proxy, because of authentication error. I just wrote settings in format: for http_proxy, https_proxy and it works now. Thanks man, you saved me a lot of nerves :) – Иван Бишевац Feb 4 '13 at 22:25
Glad it worked. :) – green Feb 5 '13 at 11:33
Thank you so much :D i got these settings into /etc/environment. I usually use .bashrc so didn't figure how much files are interfering that. – erm3nda Jun 22 '15 at 13:35

Your Answer


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.