473

Is there a command to remove all global npm modules? If not, what do you suggest?

31 Answers 31

1
2
-5

Just put in your console:

sudo npm list -g --depth=0. | awk -F ' ' '{print $2}' | awk -F '@' '{print $1}' | sudo xargs npm remove -g

Its work for me...

Sign up to request clarification or add additional context in comments.

1 Comment

Exact copt of solution already mentioned here, on this very same page.
1
2

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.