在 Ubuntu 上“卸载 Fortran”通常指卸载 gfortran(GNU Fortran 编译器) 或相关的 Fortran 工具链。下面按常见情况说明:
如果你是用 apt 安装的:
sudo apt remove gfortran
如果想连配置文件一起删掉:
sudo apt purge gfortran
然后清理无用依赖:
sudo apt autoremove
检查系统里有哪些 Fortran 相关包:
dpkg -l | grep -i fortran
常见包名:
gfortrangfortran-11 / gfortran-12 等(特定版本)libgfortran* (运行库,一般不建议删)卸载指定版本示例:
sudo apt remove gfortran-11
conda remove gfortran
或从环境中移除:
conda remove -n 环境名 gfortran
如果是 make install 装的,通常:
sudo make uninstall
which gfortran
sudo rm /usr/local/bin/gfortran
gfortran --version
若提示 command not found 即已成功卸载。
如果你说的“Fortran”是指 某个科学计算软件(如 LAPACK、OpenCoarrays、Intel Fortran),可以告诉我具体名称,我给你精确卸载方式。