Ubuntu卸载Anaconda步骤
作者:互联网
1 进行相关文件的删除(删除9个文件夹)
- 删除anaconda3文件夹
rm -rf ~/anaconda3
- 删除.anaconda文件夹
rm -rf ~/.anaconda
- 删除.condarc文件夹
rm -rf ~/.condarc
- 删除.conda文件夹
rm -rf ~/.conda
- 删除.continuum文件夹
rm -rf ~/.continuum
- 删除.ipython文件夹
rm -rf ~/.ipython
- 删除/.local/share/jupyter
rm -rf ~/.local/share/jupyter
- 删除/.local/share/Spyder
rm -rf ~/.local/share/Spyder
- 删除/.config/spyder-py3
rm -rf ~/.config/spyder-py3
2、删除Anaconda·配置的环境变量
2.1 打开/.bashrc文件
sudo gedit ~/.bashrc
2.2 编辑/.bashrc内容
2.2.1 情况一
删除 包含 # >>> conda initialize >>>与# <<< conda initialize <<<以及两者之间的所有内容
,例如我的是删除
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/alice/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/alice/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/alice/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/alice/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
2.2.2 情况二
如果末尾有自己添加的anaconda路径内容,也要删除
将末尾的此行删除
# added by Anaconda3 installer
export PATH="/home/alice/anaconda3/bin:$PATH"
此处的alice应为你的实际用户名
2.3 更新环境变量,使更改生效
命令如下:
source ~/.bashrc
至此,anaconda已经完全被卸载 此后,可进行Anaconda的重新安装了
标签:删除,anaconda3,Ubuntu,Anaconda,rf,文件夹,conda,卸载,rm 来源: https://blog.csdn.net/shaqilaixi2/article/details/122866079