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.
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.
R: Packrat will not completely uninstall
The issue was indeed that .Rprofile wanted to initialize packrat() on starting R. To fix this, use the below.
Removing Packrat from .Rprofile
- Open Terminal
- Type on a new command line: open ~/.Rprofile
- Delete the lines related to packrat (these should be clearly labelled because they contain the word packrat)
- Save the file
- Restart R/Rstudio
Related Topics
Margins Between Plots in Grid.Arrange
What's The Difference Between [1], [1,], [,1], [[1]] for a Dataframe in R
How to Format Kable Table When Knit from .Rmd to Word (With Bookdown)
Piecewise Function Fitting with Nls() in R
Why Does Apt-Get Install R-Base Install 3.2.3 Instead of 3.4.0 in R
Shapefile to Raster Conversion in R
How to Extract Bold Text from a PDF Using R
How to Get Column Names When Using Skip Along with Read.Csv
Convert to Local Time Zone Using Latitude and Longitude
Tidyeval with List of Column Names in a Function
How to Remove Certain Columns in Multiple Data Frames in R
How to Generate Multivariate Random Numbers with Different Marginal Distributions
What Does Na.Rm=True Actually Means
Changing The Radius of a Coord_Polar Ggplot
Ggplot2 Equivalent of 'Factorization or Categorization' in Googlevis in R