How to uninstall R and RStudio with all packages, settings and everything else?
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:
- Run
.libPaths()
and save the listed directories shown on the RStudio console. In my case, it looks like:
.libPaths()
"C:/Users/%USERNAME%/Documents/R/win-library/3.6"
"C:/Program Files/R/R-3.6.3/library"
Uninstall R for Windows, RStudio and RTools from Windows "Programs and Features" menu. You might navigate there through: Add or remove programs > App & features > On search box
Delete everything in folders that was shown after running
.libPaths()
instruction in R to know where R packages are installed.
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
C:\Users\%USERNAME%\AppData\Local\Temp > only specific ones mentioned below.
Specific ones can be various files and folders which can be deleted under this directory related with R and RStudio sessions. In my case, Rtmpcx1qAZ
, Rtmpk7UXWj
, Rscript3d2438240e1
, ... are only example files or folder names to give you rough idea.
- Delete everything inside those listed folders or completely delete those listed folders as well:
C:\Users\%USERNAME%\AppData\Local\R
C:\Users\%USERNAME%\AppData\Local\rstudio
C:\Users\%USERNAME%\AppData\Local\RStudio-Desktop
C:\Users\%USERNAME%\AppData\Local\r-miniconda
C:\Users\%USERNAME%\AppData\Local\r-reticulate
C:\Users\%USERNAME%\AppData\Local\??? (!!!might be some others in your case!!!)
C:\Users\%USERNAME%\AppData\Roaming\R
C:\Users\%USERNAME%\AppData\Roaming\RStudio
Then you can move on the re-installation side for R as below (after suggested reboot of Windows). In order (please):
Download R for Windows, (download RTools if you need) and RStudio Desktop.
- Install R (R for Windows)
- Install RTools (if you need)
- Install RStudio (RStudio Desktop)
Complete remove and reinstall R, including all packages
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.
How to uninstall R completely from OS X
Use which R
. It will give you the location where R is running so that you can remove it from there.
Unistall R completely from Linux Mint 19 and do a fresh install
I gave up on Linux Mint and installed Ubuntu 20.04. R 4.0.2 works out of the box and the problem is solved.
How Do I Wipe My RStudio Clean (Windows)?
From this page: "RStudio Desktop stores your custom settings and options in a hidden directory called RStudio-Desktop. If this directory does not exist, RStudio will create it on start up. This directory includes user settings, log files, and other state information. Removing (or renaming) this directory will reset RStudio's state analogous to a fresh installation."
Re-install R / Rstudio and migrating library
If you are installing the exact same R version with the same configuration and everything, you could avoid reinstalling it if you just move the folder with installed libraries somewhere else and then create a .Rprofile
file that would set .libPaths
(not 100% sure what it's called) to the folder where your installed libraries are.
Related Topics
What Ways Are There to Edit a Function in R
Usage of '...' (Three-Dots or Dot-Dot-Dot) in Functions
Difference Between the == and %In% Operators in R
Ggplot2 Keep Unused Levels Barplot
How to Open CSV File in R When R Says "No Such File or Directory"
How to Calculate Mean/Median Per Group in a Dataframe in R
Aggregate a Data Frame Based on Unordered Pairs of Columns
Ggplot, Drawing Line Between Points Across Facets
Use a Value from the Previous Row in an R Data.Table Calculation
R Install.Packages Returns "Failed to Create Lock Directory"
Pass Column Name in Data.Table Using Variable
Finding Percentage in a Sub-Group Using Group_By and Summarise
Apply Multiple Functions to Multiple Columns in Data.Table
How to Assign from a Function Which Returns More Than One Value