Closed clbarnes closed 3 years ago
Remotes doesn't store the downloaded repository, it downloads it to the R sessions temp directory and then installs the package from there. The only thing in R_LIBS_USER
is the built package.
This sort of question is a better fit for https://community.rstudio.com. If you have further questions along this line do you mind asking them over there? (You might want to read https://www.tidyverse.org/help/ first to maximise your chances of getting a good answer)
Sure, thank you for your quick and informative response!
I'm trying to set up an R environment as part of a larger application in a docker container. A number of packages are installed using
remotes::install_{github,version}
and I was wondering whether it was possible to reduce the size of$R_LIBS_USER
(which is now multiple gigabytes). Is there any distinction between the cloned repository/ downloaded tarball and the built R package, so that the repo (which often has an extensive git history, lots of static files as part of web docs etc.) could be removed and keep the docker image light?I am already clearing temporary files (
rm -rf /tmp/Rtmp*
).