windows – Need to fully uninstall R 4.3.1 but do not know where it is/was installed
R has certain files like .Rprofile files which can still keep information.
Another thing is the .libPaths() which contains the paths to the folders which contain R libraries.
Helpful where paths of binaries are is the linux which command.
Since you are in a Windows machine, it won’t be available unless you install it. But luckily you have R!
Sys.which() command from inside your R session will help you to find paths. E.g. do Sys.which("R") and it will show you the exact path where your R is located. (But it could be a softlink – be aware).
My guess is if you delete them, then your R4.4.2 will behave like new.
You can behave it already like new by starting it with:
R --vanilla
which makes it ignore any dot files like .Rprofile etc.
In your running R session, type:
.libPaths()
it will return all paths to folders which contain R libraries.
You can wipe them out (or back them up before you wipe them out.
And document somewhere where their exact path was.
If you delete the content in those directories, then you will have a clean R.
I would recommend you to use rig because it will give you full control over different versions of R and allows you to have and organize multiple R versions on the same machine.
This is the list of environment variables your operating system uses to run your R.
stat.ethz.ch/R-manual/R-devel/library/base/html/EnvVar.html
You can check the content of the variables from your running R session using
Sys.getenv() command. And you can change their values by Sys.setenv().
Read more here: Source link
