How do I uninstall nodejs installed from pkg (Mac OS X)?

前端 未结 10 1952
别那么骄傲
别那么骄傲 2020-11-30 16:32

I installed NodeJS from pkg file on my Mac. Now I need to uninstall it. Tell me please how to do it. I tried to remove files from this list:

lsbom -f

10条回答
  •  野性不改
    2020-11-30 16:49

    In order to delete the 'native' node.js installation, I have used the method suggested in previous answers sudo npm uninstall npm -g, with additional sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*.

    BUT, I had to also delete the following two directories:

    sudo rm -rf /usr/local/include/node /Users/$USER/.npm
    

    Only after that I could install node.js with Homebrew.

提交回复
热议问题