Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Complete remove and reinstall R, including all packages

After some heavy tinkering, I must have screwed up my R installation and some package permissions. Rather than try to fix it, I just want to wipe and reinstall everything. So I did:

sudo apt-get remove r-base-core sudo apt-get remove r-base sudo apt-get autoremove 

Which did uninstall R, except when I reinstalled R, my old packages were still available (and some of them were causing troubles).

How can I do a complete reinstall, including removing all packages, except for the included base library?

like image 334
Misconstruction Avatar asked Jun 09 '14 10:06

Misconstruction


People also ask

How do I uninstall and reinstall a package in R?

Go to the Packages in right bottom corner of Rstudio, sear the package name and click on the adjacent X icon to remove it. Reinstall the package from Bioconductor/CRAN.

How do I completely delete 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 completely remove R from my Mac?

1. Go to Applications in Finder, control-click R-Studio. app, and select Move to Trash.


1 Answers

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.

like image 111
Vincent Guyader Avatar answered Oct 14 '22 18:10

Vincent Guyader