Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall R and RStudio with all packages, settings and everything else?

Tags:

I messed up something and there is a problem with tidyverse. Tried to find a solution but spend lots of time without result.

How to uninstall R and RStudio with all packages, settings and everything else on Windows. I tried to uninstall through Windows uninstall menu and after I installed R and RStudio again same packages appeared as they were installed before. How can I erase everything related to R and RStudio so I be able to make a fresh install?

like image 257
vasili111 Avatar asked Mar 17 '19 05:03

vasili111


People also ask

How do I completely wipe my R?

Method 2: Uninstall R for Windows via Apps and Features/Programs and Features. Look for R for Windows in the list and click on it. The next step is to click on uninstall, so you can initiate the uninstallation.

How do I uninstall R and RStudio from Windows?

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.

Do I need to uninstall R before installing new version?

No need to uninstall. You can download and install the new version of R Studio with no issues.

Do I need to install both R and RStudio?

RStudio requires an installation of R 3.0. 1 or higher. You can download the most recent version of R for your environment from CRAN.

How do I uninstall RStudio on Linux?

Linux: Remove RStudio using your system's uninstaller from the command line: 1 Debian/Ubuntu - $ sudo apt-get remove rstudio 2 CentOS/RedHat/Fedora - $ sudo rpm -e rstudio More ...

How do I remove a package from a directory in R?

In R, you can use the .libPaths () instruction (or R -e '.libPaths ()' in terminal) to know where your packages are installed. Delete those folders and reinstall. This worked perfectly! I remove two directories with my installed packages, and apt-get remove took care of the main files.

How to uninstall R in Windows?

Uninstall R, RStudio and RTools from Windows " Programs and Features " menu. Delete everything in folders that was shown after running .libPaths () instruction in R to know where R packages are installed. In my case, it looks like: 1 "C:/Users/%USERNAME%/Documents/R/win-library/3.6" "C:/Program Files/R/R-3.6.3/library"

How to find where R packages are installed?

Packages might be installed in your local directory. maybe ~/.R. Open R or Rstudio and type .libPaths () this will show you where all the packages are installed. Just make sure that everything in those folders are deleted after you uninstall R. Good luck.


1 Answers

I have further issues with the previous answer. For that reason, I have extended the answer with further steps (which I experienced currently) as below:

  1. Uninstall R, RStudio and RTools from Windows "Programs and Features" menu.

  2. Delete everything in folders that was shown after running .libPaths() instruction in R to know where R packages are installed. In my case, it looks like:

    .libPaths()

    1 "C:/Users/%USERNAME%/Documents/R/win-library/3.6" "C:/Program Files/R/R-3.6.3/library"

Therefore, I have manually deleted following files and folders (they remain there after full uninstallation of R, RStudio and RTools) as well:

- C:\Users\%USERNAME%\Documents\R\ - C:\Users\%USERNAME%\Documents\.Rhistory - Various files and folders under C:\Users\%USERNAME%\AppData\Local\Temp related with R and RStudio sessions. 
  1. Delete everything in C:\Users\%USERNAME%\AppData\Local\RStudio-Desktop

  2. Delete everything in C:\Users\%USERNAME%\AppData\Local\rstudio

Then you can move on the re-installation side for R (after suggested reboot of Windows) as below. In order (please): Download R for Windows and RStudio Desktop. (If you need, download also RTools)

  • Install R
  • Install RTools (if you need)
  • Install RStudio.
like image 145
ozturkib Avatar answered Sep 19 '22 13:09

ozturkib