Misconstruction
Misconstruction

Reputation: 1909

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?

Upvotes: 67

Views: 109710

Answers (1)

Vincent Guyader
Vincent Guyader

Reputation: 3199

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.

Upvotes: 74

Related Questions