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
    
  • 相关阅读:
    MySQL 你好,死锁
    Python+Scrapy+Selenium数据采集
    令牌桶限频(Token Bucket)
    Go 逃逸分析
    ElasticSearch 连载二 中文分词
    ElasticSearch 连载一 基础入门
    基于GitLab CI搭建Golang自动构建环境
    Go 性能分析之案例一
    MySQL InnoDB 行记录格式(ROW_FORMAT)
    MySQL InnoDB 逻辑存储结构
  • 原文地址:https://www.cnblogs.com/everlose/p/12846234.html
Copyright © 2011-2022 走看看