renv
by renv

What renv is
renv is a free environment manager for R projects, made by renv, whose founding year is 2019. It gives each project a private package library, keeping package installs and updates for one project separate from others. Its lockfile, renv.lock, records package versions and metadata so collaborators can restore the recorded dependencies in another environment. The documented workflow starts with init() to set up a project, uses snapshot() to record packages, and uses restore() to reinstall them. renv supports R packages and can also manage a project-local Python environment and track Python dependencies for R projects that use Python. It describes package installation and updates from CRAN and GitHub, and a shared cache can speed package operations across projects. Guides cover restoring project libraries in GitHub Actions and GitLab CI, working with Docker, and managing local environments for content published to Posit Connect. When Posit Package Manager is used as a repository, renv::vulns() can check dependencies for known vulnerabilities. renv runs on Windows, macOS, and Linux and is distributed under the MIT license. Its lockfile captures package state, while operating systems and system libraries can also affect runtime behavior.
Who it suits
renv suits R project teams that want separate project libraries and a lockfile collaborators can use to restore dependencies. It can also suit projects combining R and Python packages, or workflows using GitHub Actions, GitLab CI, Docker, or Posit Connect.
What it does well
- Keeps each project's package library separate.
- Records package versions and metadata in renv.lock.
- Supports dependency restoration with restore().
- Can track Python dependencies alongside R packages.
- Runs on Windows, macOS, and Linux.
- Distributed under the MIT license.
What to know first
- System libraries and operating systems can affect runtime behavior beyond the lockfile.
- Static analysis may not detect every way a package is used.
- Packages must be installed and detected as used to enter the lockfile by default.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| renv | R project environment management · MIT licensed | Free |
As rstudio.github.io lists them, read 9 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the renv website.
- Set up an R project with init().
- Install the project packages you need from CRAN or GitHub.
- Use snapshot() to record package versions and metadata in renv.lock.
- Use restore() to reinstall the recorded dependencies elsewhere.
Verdict
Choose renv if you need isolated R project libraries and a lockfile-based way to record and restore dependencies. Consider Docker as well when operating-system and system-library details matter, since renv's lockfile does not capture those aspects by itself.
Questions
How much does renv cost?
renv is free. Its listed plan is free.
Which platforms does renv support?
renv supports Windows, macOS, and Linux.
Can renv manage Python packages?
Yes. For R projects that use Python packages, it can manage a project-local Python environment and track Python dependencies alongside R packages.
Does renv support lockfiles?
Yes. It records package versions and metadata in renv.lock, which collaborators can use to restore dependencies.
Is renv open source?
renv is distributed under the MIT license.
What can affect reproducibility beyond renv's lockfile?
Operating systems, compiler flags, numerical libraries, and system libraries can affect runtime behavior beyond the R library state captured by renv.
Facts from renv's own pages
- CI integrations
- The CI guide covers GitHub Actions and GitLab CI workflows for restoring project libraries from the lockfile. · rstudio.github.io, 9 Oct 2026
- Dependency discovery limit
- By default, a package must be installed in the project library and detected as used by the project to be recorded in the lockfile; static analysis may not recognize every way a package is used. · rstudio.github.io, 9 Oct 2026
- Dependency resolution
- Yes · opensource.posit.co, 21 Sept 2026
- Docker
- The Docker guide explains using renv with containers to fix both the underlying system and required R packages for an application. · rstudio.github.io, 9 Oct 2026
- Founded
- 2019 · rstudio.github.io, 28 Sept 2026
- Free plan
- Yes · opensource.posit.co, 21 Sept 2026
- License
- renv is distributed under the MIT license. · rstudio.github.io, 9 Oct 2026
- Lockfile
- renv records package versions and metadata in a renv.lock file so they can be reinstalled elsewhere. · rstudio.github.io, 9 Oct 2026
- Lockfiles
- renv records package versions and metadata in renv.lock, which collaborators can use to restore project dependencies. · rstudio.github.io, 9 Oct 2026
- Lockfile support
- Yes · opensource.posit.co, 21 Sept 2026
- Offline installation
- Yes · opensource.posit.co, 21 Sept 2026
- Package cache
- renv uses a cache to make installing and updating packages across multiple projects faster. · rstudio.github.io, 9 Oct 2026
- Package formats
- R packages; Python packages · opensource.posit.co, 21 Sept 2026
- Package sources
- The overview describes installing and updating packages from CRAN and GitHub. · rstudio.github.io, 9 Oct 2026
- Posit Connect
- renv can manage the local project environment for content published to Posit Connect, which recreates and manages the deployment environment. · rstudio.github.io, 9 Oct 2026
- Private registry auth
- Yes · opensource.posit.co, 21 Sept 2026
- Project libraries
- Each project gets a private library, so installing or updating a package for one project does not affect other projects. · rstudio.github.io, 9 Oct 2026
- Purpose
- renv helps create isolated, portable, reproducible environments for R projects. · rstudio.github.io, 9 Oct 2026
- Python integration
- For R projects that also use Python packages, renv can manage a project-local Python environment and track Python dependencies alongside R packages. · rstudio.github.io, 9 Oct 2026
- Reproducibility limit
- The documentation notes that operating systems, compiler flags, and system libraries can still affect runtime behavior, and recommends Docker to capture these aspects. · rstudio.github.io, 9 Oct 2026
- Support
- The project directs questions to its FAQ and Posit Forum, and bug reports to its GitHub issue tracker. · rstudio.github.io, 9 Oct 2026
- Supported platforms
- Windows,macOS,Linux · opensource.posit.co, 21 Sept 2026
- System reproducibility limit
- The Docker guide notes that operating system, compiler flags, numerical libraries, and system libraries can affect runtime behavior beyond the R library state captured by renv. · rstudio.github.io, 9 Oct 2026
- Vulnerability checks
- When using Posit Package Manager as a repository, renv::vulns() can check project dependencies for known vulnerabilities. · rstudio.github.io, 9 Oct 2026
Where renv stands on Freedom251
- Package Managers#19 of 93