Installing RStudio in a different drive

My C drive is full. I wish to install R and RStudio in my D drive along with all of my downloaded packages/library files. I wish to uninstall all R files from the C drive.

I downloaded the latest version of RStudio into the D drive. I now have RStudio in both drives and the old version opens up when I click on the RStudio tab. R and the packages are still in the C drive.

I am using Windows 11. Add and Remove Programs only lists the newer version of RStudio. However, I can still find RStudio in my C drive.

Advice would be appreciated.

Hi @irasharenow100, welcome back to the community!

This thread highlights how to use .Renviron to set the location of where your libraries will be installed:

Best,
Randy

Thanks, but I am reluctant to try and change paths. I have no experience doing so. In any case, my main goal is to efficiently remove R and RStudio from my C drive and instead install them in my D drive. It would also be nice to be able to move the libraries.

Changing the path will allow you to install your packages on the D drive. Then you can delete them from C. I prefer this, as it keeps your working installation until you confirm that the path is correct.

Alternatively, you could copy your existing library from C to D, then set the path to where you moved them onto the D drive.

Best,
Randy

1 Like

Thanks. I am very reluctant to change paths as that can lead to a very serious problem with my computer’s operation.
If I uninstall R and RStudio can I then re-install them in the D drive? I just did that with Tableau. Can I then copy and paste my package location over to the D drive?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.