- Open your terminal
- Go to home directory
- Type
cd usr - Type
cd local - Type
cd include - Type
ls - Delete node directory by typing
sudo rm -rf node - Go back to local directory by typing
cd .. - Go to lib dirctory
cd lib - Delete node_modules folder, type
sudo rm -rf node-modules - Go to bin directory by typing
cd ..andcd bin - Type
sudo rm -rf node
P>S : npm and npx folders can also be deleted inside the bin folder
Node.js is successfully uninstalled
Top comments (3)
Line 3 is wrong. It should be "Type cd /usr".
Step above that says to go to home directory. But he could put "Type cd /" in the step to go to home directory.
But / is not home directory, it's called root directory. ~ is the home directory.