How to uninstall npm global packages (including yourself) and nodejs?

how do I uninstall all npm global packages (including npm itself) and node.js in Windows10 and Unbuntu 16.04.2?

A search on the Internet has found a lot of commands. It seems that uninstalling npm and nodejs is not an easy task. Ask for advice.


In the case of

win, I uninstall it directly in the program management that comes with the system:
clipboard.png

of course, some other global packages need to be deleted in the installation directory.
for example, C:\ Users\ your user name\ AppData\ Roaming\ npm\ node_modules (if not, open the hidden folder. )

the above is for reference only.


found the following solution
https://blog.csdn.net/nsrainb.

it depends on how you install it. Use sudo apt-get remove nodejs to uninstall nodejs.

generally node is / usr/local/bin , npm and node_modules are / usr/local/lib .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36dc4-34414.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36dc4-34414.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?