完全卸载r linux
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20336644/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
completely uninstall r linux
提问by brucezepplin
I am trying to update my version of R on linux mint, however broken dependencies are stopping me doing this. after trying everything such as adding repos from Cran, sudo apt-get update, I still cannot install the latest version of R.
我正在尝试在 linux mint 上更新我的 R 版本,但是损坏的依赖关系阻止了我这样做。在尝试了所有操作(例如从 Cran 添加 repos、sudo apt-get update)后,我仍然无法安装最新版本的 R。
MY question is how to i completely remove R from my machine, so that I can restart. I have tried :
我的问题是如何从我的机器中完全删除 R,以便我可以重新启动。我试过了 :
sudo apt-get remove r-base
however when I run R it still works:
但是,当我运行 R 时,它仍然有效:
laptop$ R
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
and doesn;t seem to be removed at all.
并且似乎根本没有被删除。
I want a clean, fresh install, but I don't think I am removing R properly
我想要一个干净的全新安装,但我认为我没有正确删除 R
采纳答案by Dirk Eddelbuettel
The R binary (well, front-end script) is part of the r-base-core
package which contains the core R system.
R 二进制文件(好吧,前端脚本)是r-base-core
包含核心 R 系统的包的一部分。
The package r-base
is a so-called virtual package which exists to just pulls other packages in. Removing it does not remove any parts of the R system --- for which you need to remove r-base-core
.
该包r-base
是所谓的虚拟包,它的存在只是为了拉入其他包。删除它不会删除 R 系统的任何部分——您需要删除r-base-core
.
回答by Andreas Yankopolus
At your Linux command line, try:
在您的 Linux 命令行中,尝试:
dpkg --get-selections | grep "^r\-"
This will list R packages installed on your system. You can then delete them by name.
这将列出系统上安装的 R 包。然后您可以按名称删除它们。
回答by janos
You might want to check on all currently installed R packages.
您可能想要检查所有当前安装的 R 包。
You can list all packages whose name starts with "r-" like this:
您可以像这样列出名称以“r-”开头的所有包:
dpkg -l | grep ^ii | awk ' ~ /^r-/ { print }'
To uninstall all of them, pipe the output to xargs apt-get remove
:
要卸载所有这些,请将输出通过管道传输到xargs apt-get remove
:
dpkg -l | grep ^ii | awk ' ~ /^r-/ { print }' | xargs apt-get remove --purge
回答by Harwant Pannu
dpkg -l | grep ^ii | awk ' ~ /^r-/ { print }' | sudo xargs apt-get remove --purge -y
Worked for me on Ubuntu 14.04. Note sudoaddition to the previous suggestion by others.
在 Ubuntu 14.04 上为我工作。注意sudo对其他人先前建议的补充。
回答by Maria Silvia Morlino
Hopefully this proves useful.
In addition to running:
sudo apt-get remove r-base
sudo apt-get remove r-base-core
try also:
sudo apt purge r-*
希望这证明是有用的。除了运行:
sudo apt-get remove r-base
sudo apt-get remove r-base-core
还尝试:
sudo apt purge r-*