I've just tried about every non-windows solution from this question and it indeed did something, but
npm ls -gp --depth=0.
returns
/usr/local/lib
/usr/local/lib/node_modules/@angular/cli
and that entry seems to be immortal. One of the the commands I tried was
sudo npm ls -gp --depth=0 |
awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' |
xargs sudo npm -g rm
which now reports "up to date". I can see that in the end
sudo npm -g rm cli
gets executed, but does nothing (no idea if it should, I'm just trying to do a clean up to get a college's angular project running on my computer).
I've also tried variations with uninstall
in place of rm
and many other clueless approaches, but nothing changes.
Should I just nuke /usr/local/lib/node_modules
or how else can I get rid of cli
?
npm --version
5.6.0