Project Environments
Overview
A dependency management toolkit for R. Using 'renv', you can create and manage project-local R libraries, save the state of these libraries to a 'lockfile', and later restore your library as required. Together, these tools can help make your projects more isolated, portable, and reproducible.
renv::hydrate()no longer reports packages that are already installed in the project library as "not available locally", nor re-installs them, when those packages are not found in the user or site libraries. (#2172)renv::restore()andrenv::install()now install repository archives of packages whose lockfile record includes aRemoteSubdirfield (for example, packages originally built from a sub-directory of a GitHub repository and then published to a custom repository). Previously, renv failed to find theDESCRIPTIONfile within such archives and fell back to cloning the package's git repository instead. (#1703)- renv now writes the
GithubSubdirfield, alongside the otherGithub*compatibility fields, when installing a package from a sub-directory of a GitHub repository. (#2165)
Show all changes in 1.3.1Hide the rest of the changes in 1.3.1
renv::lockfile_validate()now reports a clear error when thejsonvalidatepackage is not installed. (#2184)- renv now warns when a retrieved package is not the one that was requested, for example because a download cache entry or a repository served a tarball for a different package. Previously, renv silently installed whatever package it had retrieved. (#2322)
- Concurrent restores sharing a package cache no longer fail with errors like
dependency 'rlang' is not availablewhen they build the same package at the same time. Previously, the restore that finished last replaced the cache entry that the other restore's library already linked to, which briefly left that link dangling. renv now links a duplicate build to the existing cache entry instead, unless that package was requested to be rebuilt. (#2400) renv::install()andrenv::restore()now check the cache again just before building each package, and install from the cache if a matching entry has appeared since the up-front check. Concurrent restores sharing a cache thus converge on the first build of each package rather than all building every package that was missing from the cache when they started. (#2403)- New cache entries now appear atomically when the cache lives on a different filesystem than the project library (for example, a cache on a mounted volume in CI). Previously, renv moved packages into such a cache with
mv, which copies the package into its final location piece by piece; a concurrent restore could observe the partially-copied entry and link its library to it. renv now copies the package into a temporary directory alongside its final location and renames it into place. (#2402) renv::install()andrenv::restore()no longer leave.renv-backup-*directories behind in the library when staged installs are disabled (via therenv.config.install.stagedoption) and more packages are ready to be built than can be built at once. Previously, renv could lose track of the backup of an existing installation while its package waited to be built, so that the backup was neither removed after a successful install, nor restored after a failed one. (#2407)- A vendored copy of renv (created with
renv:::vendor()) now bundles the files it reads at runtime, so that system requirements checks, git credential helpers, and discovery ofrenv::use()calls work when renv itself is not installed. Previously these looked the files up in an installed copy of renv. (#2397) renv::sysreqs()now reports the system requirements of the recursive dependencies of the requested packages as well. Previously, only the requested packages themselves were considered, so that (for example)renv::sysreqs("ragg")did not report the system libraries required bysystemfontsandtextshaping, even thoughraggcannot be installed without them. Userecursive = FALSEto restore the old behavior. (#2352)renv::sysreqs()now reports on the packages recorded in the project lockfile by default, together with the packages used in the project. This is the same set of packages thatrenv::restore()would install, so the system requirements for a project can be computed fromrenv.lockalone -- for example, when authoring a Dockerfile, before any R packages have been installed. (#2352)renv::sysreqs()gains asourceargument, controlling which version of each package is used when computing system requirements. System requirements (and package dependencies) are specific to a particular version of a package, so the versions used matter. For each package, the requested sources are tried in order:"lockfile"uses the version recorded in the project lockfile,"library"uses the installed version of the package, and"crandb"queries <https://crandb.r-pkg.org> for the latest version available from the active package repositories. The default consults all three, in that order. Previously, the latest CRAN release of each package was always used. Thelocalargument is superseded bysource = "library". See?renv::sysreqsfor more details. (#2352)- When pak integration is enabled (via the
renv.config.pak.enabledoption) andpakis itself recorded in the lockfile,renv::restore()now installs and uses the recorded version ofpak, rather than the latest version available from the pak repositories. Other functions use the recorded version whenpakneeds to be installed, and otherwise leave the installed version ofpakalone. Lockfile records for versions ofpakolder than the minimum version supported by renv are ignored, and renv falls back to the previous behavior if the recorded version cannot be installed. (#2169) renv::install()now signals an error when a requested package fails to install, even if an older version of that package remains installed. Previously, a failed upgrade, or a transactional install that was rolled back, could return without an error. (#2384)renv::restore()now installs the versions recorded in the lockfile even when another package declares one of those dependencies in theRemotes:field of its DESCRIPTION. Previously, theRemotes:entry took precedence, so restore could install (or record) the remote's latest commit instead, and then report that the dependency tree was repaired. Similarly,renv::install()now prefers the project's ownRemotes:entries, and exact version requirements such asbread (== 1.0.0), over another package'sRemotes:entry for the same package. This was a regression in renv 1.2.0. The project'sRemotes:entries now also apply to packages that are only indirect dependencies. (#2395)- When another package's
Remotes:entry supplies a dependency,renv::install()andrenv::restore()now install that dependency from the remote. Previously, a dependency from a git remote could be installed from the package repositories (or the lockfile) instead, while being recorded as coming from the remote. Relatedly, when another package requires a newer version of a package from a git remote (or another non-repository source), renv no longer reports that package at the latest repository version while installing the recorded one; the unsatisfied requirement is reported instead. This was a regression in renv 1.2.0. (#2395)
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-17
- WARNING12 OK, 1 WARNING2026-10-01
- OK13 OK2026-08-21
- WARNING12 OK, 1 WARNING2026-08-17
- OK13 OK2026-08-05
Show 12 earlier changesHide 12 earlier changes
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-02
- NOTE12 OK, 1 NOTE2026-04-29
- ERROR11 OK, 1 NOTE, 1 ERROR2026-04-28
- NOTE11 OK, 1 NOTE2026-04-25
- OK14 OK2026-04-09
- NOTE13 OK, 1 NOTE2026-03-28
- WARNING10 OK, 3 NOTE, 1 WARNING2026-03-20
- NOTE13 OK, 1 NOTE2026-03-17
- OK14 OK2026-03-10
Documentation
- Help pages
- 49 (6 internal)includes a package overview page
- Examples that run
- 6%2 run in a plain check · 33 never run
- Exported functions with examples
- 77%
- Documented parameters
- 100%
- Return-value docs
- 75%
- Help pages citing references
- 0%
- Introduction to renv HTML
- Frequently asked questions HTML
- Installing packages HTML
- Package development HTML
- Package sources HTML
- packrat vs. renv HTML
- Project profiles HTML
- Using Python with renv HTML
- Using renv with continuous integration HTML
- Using renv with Docker HTML
Show 1 moreHide 1 vignette
Downloads
Repository
- PRs merged (all time)
- 87%
- Median days to close, 50 most recently updated closed issues
- 6
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
11 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/rstudio/renv on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-17 · The repository has a site deploy workflow
pkgdown site last built 2026-10-06
Show all practicesHide 2 practices
Dependencies
Installing renv adds no packages beyond those that come with R.
Show the 48 most downloaded packagesHide the 48 most downloaded packages
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.3.1Latest
- 1.3.02026-09-29 · diff ↗
- 1.2.4
- 1.2.32026-05-16 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 1.2.22026-04-16 · diff ↗
- 1.2.12026-04-12 · diff ↗
- 1.2.0
- 1.1.82026-03-05 · diff ↗
- 1.1.72026-01-27 · diff ↗
- 1.1.6
- 1.1.52025-07-24 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.1.42025-03-20 · diff ↗
- 1.1.32025-03-18 · diff ↗
- 1.1.2
Show 51 earlier eventsHide 51 earlier events
- 1.1.12025-02-07 · diff ↗
- 1.1.02025-01-29 · diff ↗
- 1.0.112024-10-12 · diff ↗
- 1.0.102024-10-05 · diff ↗
- 1.0.92024-09-24 · diff ↗
- 1.0.8
- RR 4.4.0 released · 2024-04-24
- 1.0.72024-04-12 · diff ↗
- 1.0.62024-04-11 · diff ↗
- 1.0.52024-02-29 · diff ↗
- 1.0.42024-02-21 · diff ↗
- 1.0.32023-09-19 · diff ↗
- 1.0.22023-08-15 · diff ↗
- 1.0.12023-08-10 · diff ↗
- 1.0.02023-07-07 · diff ↗ ·
added 6 exports
checkout, lockfile_create, lockfile_modify, lockfile_read, lockfile_write, sandbox - RR 4.3.0 released · 2023-04-21
- 0.17.32023-04-06 · diff ↗
- 0.17.22023-03-18 · diff ↗
- 0.17.12023-03-16 · diff ↗
- 0.17.02023-03-02 · diff ↗
- 0.16.02022-09-29 · diff ↗
- 0.15.52022-05-27 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.15.42022-03-03 · diff ↗
- 0.15.3
- 0.15.22022-01-24 · diff ↗
- 0.15.12022-01-13 · diff ↗
- 0.15.0
- 0.14.0
- RR 4.1.0 released · 2021-05-18
- 0.13.22021-03-30 · diff ↗
- 0.13.12021-03-18 · diff ↗
- 0.13.0
- 0.12.52021-01-09 · diff ↗
- 0.12.42021-01-07 · diff ↗
- 0.12.32020-11-25 · diff ↗
- 0.12.22020-11-05 · diff ↗
- 0.12.12020-11-02 · diff ↗
- 0.12.02020-08-28 · diff ↗
- 0.11.02020-06-26 · diff ↗
- 0.10.02020-05-06 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.9.3
- 0.9.22019-12-09 · diff ↗
- 0.9.12019-12-09 · diff ↗
- 0.9.0
- 0.8.3
- 0.8.22019-10-26 · diff ↗
- 0.8.12019-10-26 · diff ↗
- 0.8.02019-10-25
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-10-25
- Total releases
- 59 / 7 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 1.5 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("renv")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.