ubuntu卸载conda

简介: ubuntu卸载conda

要在Ubuntu系统中卸载Conda,你可以按照以下步骤操作:

  1. 打开终端。
  2. 运行以下命令来定位Conda安装的根目录(通常为~/miniconda~/anaconda):
    conda info
    查看输出中的base environment/home/username/miniconda3/home/username/anaconda3
  3. 如果你想完全删除Conda,可以使用rm命令来删除安装目录:
    rm -rf ~/miniconda3
    或者如果你的安装目录是anaconda
    rm -rf ~/anaconda3
  4. 删除Conda初始化的脚本,从.bashrc.bash_profile.zshrc文件中移除对应行:
    nano ~/.bashrc # 或者 .bash_profile 或 .zshrc,取决于你使用的shell
    然后注释掉或删除类似这样的行:
    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    __conda_setup="$('/home/username/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    else
    if [ -f "/home/username/miniconda3/etc/profile.d/conda.sh" ]; then
    . "/home/username/miniconda3/etc/profile.d/conda.sh"
    else
    export PATH="/home/username/miniconda3/bin:$PATH"
    fi
    fi
    unset __conda_setup
    # <<< conda initialize <<<
    然后保存并关闭文件。
  5. 刷新你的shell配置:
    source ~/.bashrc # 或者 source ~/.bash_profile 或 source ~/.zshrc
  6. 如果你之前通过Conda初始化了shell,可能还需要从你的shell配置文件中删除任何相关的conda deactivate命令。
  7. 最后,检查系统中是否还有Conda的残留文件和环境变量,并手动删除它们。


目录
相关文章
|
9月前
|
Ubuntu Linux
【Ubuntu系统内核更新与卸载】
【Ubuntu系统内核更新与卸载】
381 0
|
9月前
|
Python
Ubuntu18.04 ROS Melodic安装和卸载
Ubuntu18.04 ROS Melodic安装和卸载简单过程
186 0
|
4天前
|
Ubuntu Shell Linux
ubuntu安装conda
ubuntu安装conda
9 0
|
4天前
|
并行计算 Ubuntu
ubuntu彻底卸载Nvidia显卡驱动
ubuntu彻底卸载Nvidia显卡驱动
17 4
|
4天前
|
Ubuntu PHP
ubuntu16.04 卸载 php7并安装php5.6记录
ubuntu16.04 卸载 php7并安装php5.6记录
|
4天前
|
关系型数据库 MySQL 应用服务中间件
Ubuntu18.04卸载lnmp
Ubuntu18.04卸载lnmp
|
4天前
|
Ubuntu Apache
ubuntu完全卸载apache2g
ubuntu完全卸载apache2
|
4天前
|
人工智能 缓存 Ubuntu
【Ubuntu】Ubuntu安装PCL(安装PCL/卸载PCL/查看PCL版本/PCL报错处理相关操作)(史上最详细)
【Ubuntu】Ubuntu安装PCL(安装PCL/卸载PCL/查看PCL版本/PCL报错处理相关操作)(史上最详细)
|
4天前
|
Ubuntu Linux Python
百度搜索:蓝易云【Ubuntu安装conda教程】
现在,你已经成功在Ubuntu系统中安装了Anaconda。你可以使用Anaconda来管理Python环境和安装各种数据科学工具和库。注意,这里假设你已经下载了合适的Anaconda安装包,且Anaconda的安装路径为默认路径。请根据实际情况进行调整。
40 0
|
4天前
|
Ubuntu
百度搜索:蓝易云【Ubuntu系统内核更新与卸载教程。】
请注意,在执行任何内核操作之前,请确保你了解正在进行的操作,并在操作之前备份重要数据。
45 0