Not able to uninstall NVM packages

冷暖自知 提交于 2019-12-11 06:27:01

问题


I have installed NodeJs in root user.When I tried to install it in sudo user, but i was not able to Install Nodejs. I was able to remove the npm packages. I am not able to remove NVM packages. So please help me to uninstall NVM packages from root user.


回答1:


Note for the next installation: if it seems that cannot run nvm, try to close the terminal, and reopen it again.

To uninstall nvm from root try:

$ rm -rf /root/.nvm Then edit /root/.bashrc file, find the following lines and delete them:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion

If there is no /root/.nvm directory, then you need to figure out where did you install nvm. Find an .nvm directory, and delete it.



来源:https://stackoverflow.com/questions/53389683/not-able-to-uninstall-nvm-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!