For some reason if you want to remove nodejs from your system and you cannot pinpoint on how you installed it in the first place, like me right now. Here is a helpful script you can use to uninstall it.
Last active
June 13, 2022 13:31
-
-
Save yasinuslu/30cbf2222caddd46ce9390ba0f15105a to your computer and use it in GitHub Desktop.
Uninstall node.js MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
removeNode() { | |
rm -rf /usr/local/lib/node_modules | |
rm -rf /usr/local/bin/node | |
rm -rf /usr/local/bin/npm | |
rm -rf /usr/local/bin/npx | |
rm -rf /usr/local/include/node | |
rm -rf $HOME/.npm | |
rm -rf /usr/local/share/systemtap/tapset/node.stp | |
rm -rf /usr/local/lib/dtrace/node.d | |
rm -rf /usr/local/share/man/man1/node.1 | |
} | |
removeNode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment