CentOS7 安装卸载升级 Node.js
安装 Node.js
查看 Node.js LTS 计划 ,确定要安装的 Node.js 版本(推荐安装 Node.js Active LTS 版本)。
使用 NodeSource 分发的 RPM 软件包安装 Node.js(如 v12.x 版本):
查看安装的 Node.js 版本:
v12.18.1
卸载 Node.js
使用 yum 卸载
使用 yum 卸载 Node.js:
重建 yum 缓存
查看缓存的 yum repo 列表:
…...
-rw-r--r-- 1 root root 474 4月 24 2018 nodesource-el7.repo
…...
删除含有 nodesource
关键词的 repo:
清除 yum 缓存:
删除 yum 缓存文件夹:
升级 Node.js
先卸载 Node.js,再安装新版即可。
参考文献
Last updated