Confusion about multiple R libraries


I am running a (Windows) computer with very limited personal hard disk space. The R library takes a lot of this space, that is why I was looking into its disk usage. I found three locations with a library inside:

  • C:\Program Files\R\R-3.5.2\library
  • Z:\R\R-3.5.1\library (Z:\ is my personal drive)
  • Z:\R\win-library\3.5

I am wondering why this is the case because I have merely installed R 3.5.2 and RStudio. .libPaths() returns

[1] "Z:/R/win-library/3.5" "C:/Program Files/R/R-3.5.2/library"

Can I get rid of one of these folders?

I'm on Windows 10, and I've two libraries:

  1. C:/Program Files/R/R-3.5.3/library
  2. C:/Users/Username/R/win-library/3.5

The first one contains the libraries that came with the R 3.5.3, and the second one contains several other packages that I downloaded later.

I don't have that any library in the corresponding location of Z:\R\R-3.5.1\library. What packages do you find here?

If there's no packages, I think you may remove this folder.

1 Like

When you install a new version of R the default behavior is to keep the old version too, if you don't want to have it anymore, then you should uninstall it and manually delete the corresponding library folder.
Also, there are two default locations for your libraries, the one under program files holds libraries installed system wide, and the other one holds libraries installed just for your specific user.


This topic was automatically closed 7 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.