Windows – How to Unset the proxy from Windows command prompt permanently

cmd.exehttp-proxywindows 7

I have set the proxy in my Windsows 7 cmd using the below commands

C:\> setx HTTP_PROXY http://username:password@proxy.example.com:1234
C:\> set HTTPS_PROXY=http://username:password@proxy.example.com:5678

Now I'm trying to remove it by using the below commands,

set http_proxy=
set https_proxy=

This works only in the current command prompt session, when I open new cmd my old proxy urls are set again, I have to use set http_proxy= again to remove it. How to remove this proxy settings permanently?

Best Answer

To delete variables in the current cmd instance, do this:

set http_proxy=
set https_proxy=

or (even better):

set "http_proxy="
set "https_proxy="

To delete variables for future cmd instances, do this:

setx http_proxy ""
setx https_proxy ""