Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

completely uninstall r linux

Tags:

linux

r

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.

MY question is how to i completely remove R from my machine, so that I can restart. I have tried :

sudo apt-get remove r-base 

however when I run R it still works:

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

like image 541
brucezepplin Avatar asked Dec 02 '13 19:12

brucezepplin


People also ask

How do I completely remove R from Linux?

Windows: Run the program uninstaller from the Start Menu (All Programs | RStudio | Uninstall). Alternatively, you may use the Add or Remove Programs utility from the control panel. Linux: Remove RStudio using your system's uninstaller from the command line: Debian/Ubuntu - $ sudo apt-get remove rstudio.


2 Answers

The R binary (well, front-end script) is part of the r-base-core package which contains the core R system.

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.

like image 125
Dirk Eddelbuettel Avatar answered Sep 21 '22 15:09

Dirk Eddelbuettel


You might want to check on all currently installed R packages.

You can list all packages whose name starts with "r-" like this:

dpkg -l | grep ^ii | awk '$2 ~ /^r-/ { print $2 }' 

To uninstall all of them, pipe the output to xargs apt-get remove:

dpkg -l | grep ^ii | awk '$2 ~ /^r-/ { print $2 }' | xargs apt-get remove --purge 
like image 20
janos Avatar answered Sep 19 '22 15:09

janos