How to clear a proxy setting in NPM
In this tutorial, we are going to learn about how to clear an http, https proxy setting in npm.
Clearing the proxy
To clear a HTTP and HTTPS proxy in npm, run the following commands:
npm config rm proxy
npm config rm https-proxy
set HTTP_PROXY=null
set HTTPS_PROXY=null
This above commands, remove the npm proxy config from your system.
If you set a proxy using the -g
flag then you can run the above commands by adding a -g
flag to it.
Example:
npm config rm http-proxy -g
npm config rm https-proxy -g
set HTTP_PROXY=null
set HTTPS_PROXY=null
Now, you can verify if a proxy is successfully removed or not by using the npm config list
command.
npm config list
If the output doesn’t contain proxy config then you are successfully removed.
You can also read, how to set a proxy in npm.