zoukankan      html  css  js  c++  java
  • node Mac 彻底卸载

    卸载node

    依次在终端执行下面的脚本

    sudo npm uninstall npm -g
    sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
    sudo rm -rf /usr/local/include/node /Users/$USER/.npm
    sudo rm /usr/local/bin/node
    sudo rm /usr/local/share/man/man1/node.1
    sudo rm /usr/local/lib/dtrace/node.d
    

    最后验证一下

    node //command not found
    npm //command not found
    

    执行步骤

    $ sudo npm uninstall npm -g
    npm WARN npm npm does not support Node.js v12.13.0
    npm WARN npm You should probably upgrade to a newer version of node as we
    npm WARN npm can't make any promises that npm will work with this version.
    npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
    npm WARN npm You can find the latest version at https://nodejs.org/
    npm WARN deprecated libcipm@1.6.3: This version mistakenly dropped node@4 compatibility in a semver-patch release. Please stay on 1.6.2 or update to 2 or latest
    npm WARN deprecated npm-registry-fetch@1.1.1: this version has a breaking change. use 1.1.0 or upgrade to latest
    npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
    removed 460 packages in 26.607s
    
    $ sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
    
    $ sudo rm -rf /usr/local/include/node /Users/$USER/.npm
    
    $ sudo rm /usr/local/bin/node
    $ sudo rm /usr/local/share/man/man1/node.1
    $ sudo rm /usr/local/lib/dtrace/node.d
    
    $ node
    bash: node: command not found
    
    $ npm
    bash: /usr/local/bin/npm: No such file or directory
    
  • 相关阅读:
    168. Excel Sheet Column Title
    461. Hamming Distance
    Tree Representation Implementation & Traversal
    404. Sum of Left Leaves
    572. Subtree of Another Tree
    20. Valid Parentheses
    Check time of different search methods
    Binary search tree or not
    Coin Change
    JS DOM:文档对象模型 --树模型 文档:标签文档,对象:文档中每个元素对象,模型:抽象化的东西
  • 原文地址:https://www.cnblogs.com/everlose/p/12846234.html
Copyright © 2011-2022 走看看