by Sai gowtham

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.

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
45,614 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
130,921 students enrolled
21 hours of video content
View Course