I have been using renv on a R project, but now want to remove it from renv versioning, i.e. delete all renv associated files, but still have access to the libraries that I used installed under renv. How do I do this? Alternatively, how do I migrate from renv to packrat?
How to completely remove renv from an R statistics program
4.2k views Asked by Obromios At
2
From RStudio's documentation, link provided by Kevin:
To deactivate
renvin a project, userenv::deactivate(). This removes therenvauto-loader from the project.Rprofile, but doesn’t touch any otherrenvfiles used in the project. If you’d like to later re-activaterenv, you can do so withrenv::activate().To remove
renvfrom a project, userenv::deactivate()to first remove therenvauto-loader from the project.Rprofile, then delete the project’srenvfolder andrenv.locklockfile as desired.If you want to completely remove any installed
renvinfrastructure components from your entire system, you can do so with the following R code:The
renvpackage can then also be uninstalled via:Note that if you’ve customized any of
renv’s infrastructure paths as described in?renv::paths, then you’ll need to find and remove those customized folders as well.