# rig: the R Installation Manager for running several R versions at once

> rig is a Rust tool from Posit that installs, removes and configures R versions, sets up CRAN and Posit Package Manager repositories, and locks project dependencies into a manifest and a lockfile without ever starting R. It suits teams and CI images that need a specific R version per project, and it ships as a single binary with no system requirements.

**r-lib/rig** — Manage R installations, packages and projects

- Repository: https://github.com/r-lib/rig
- Website: http://rig.r-lib.org/
- Stars: 1,018 · Forks: 41
- Language: Rust
- License: MIT
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/r-lib-rig

## What rig manages

rig describes itself as the R Installation Manager, and the one line summary is install, remove and configure R versions, and manage R packages and projects.

That is three jobs in one tool, and the reason they belong together is that they are all about the same thing, which is the R toolchain. The R version decides which Bioconductor release applies, which package versions are installable, and which binary package repository has a build for it. Managing them separately means the version and the packages can drift apart, and a project that works on one machine fails on another for a reason nobody can see.

The implementation is Rust, and the licence is MIT, copyright Posit Software, PBC for 2021 to 2026. The project lives in the r-lib organisation, which is the group behind R itself and the package infrastructure, and that is where the authority comes from. The author is Gábor Csárdi, who wrote the R package manager.

The quick start is three commands.

```sh
rig add release      # install the latest R release
rig list             # list installed R versions
rig default 4.5.1    # set the default R version
```

The distribution story is deliberately minimal. A single standalone tool with no system requirements, easy to install and update on every platform, with native builds for many Linux distributions and portable builds that run on any glibc or musl based Linux for the ones without a native package.

The last push to the repository was on 2026-10-15, and the most recent release is 0.11.0 from 2026-10-07.

## Several R versions, side by side and simultaneously

The first feature group is multiple R versions side by side, and the details are what make it usable rather than merely possible.

You can install as many R versions as you like and switch the default for the terminal, RStudio and Positron. Versions are selected by symbolic name, with release, devel, next and oldrel, or by an exact version.

The quick links feature is the part that goes beyond a version manager. You can run several versions at the same time, with a link named R-4.5 or R-4.5.1 starting the matching R, and the links are added to your path automatically. So a shell can have R 4.4 on the path and still run 4.5.1 by name, and a build script that needs a specific version does not have to mutate the environment it runs in.

There is also listing of both the versions you have installed and the versions available to install, and on arm64 Macs and on Windows you can choose between the x86_64 and arm64 builds of a version, or install both.

That last point is the one that catches people out on Apple Silicon, where the native build and the translated x86_64 build behave differently for some packages. Being able to hold both is a practical answer to a question that otherwise turns into a long debugging session.

## Admin mode and user mode, and why the second one exists

There are two installation modes, and the README explains what each is for.

The default admin mode installs R system wide, elevating to root or administrator only when needed. The newer user mode installs everything into your home directory with no sudo or administrator rights at all.

The user mode is a significant addition and it changes what the tool is for. A system wide installation belongs to the machine, and the person who installed it is the one who can change it, which on a shared server or a managed workstation means the R version is not yours to choose. The user mode puts the whole toolchain in your home directory, so the version is yours, the packages are yours, and you need no privileges to change either.

On Linux the tool also decides what to download. It installs the distro specific build where one is available, and otherwise falls back to the portable glibc or musl build automatically, which is what makes the promise of working on any Linux distribution practical rather than aspirational.

The other platform detail that matters for a build system is that on Windows rig installs and configures the right Rtools versions and cleans up stale R entries from the Windows registry, and that the Windows user mode archive ships the escalation helper so admin mode still works when it is needed, while the user mode archive itself needs no elevation at all.

## Package management: repositories, pak and the experimental commands

The package management group is the part of rig that is closest to replacing what a distribution's R packages do for you.

The baseline behaviour is automatic. rig configures the default CRAN mirror and the Posit Package Manager binary repositories, installs the pak package manager and enables automatic installation of system requirements, and creates and configures per user package libraries.

The repository commands are rig repos, which manages package repositories across all your R versions. You can add your own CRAN-like repositories, such as an internal mirror or an r-universe, and turn repositories on and off per R version, and rig remembers the setup.

The package commands, rig pkg, are marked experimental in the README. They install, remove and list packages in a library, and look up package information, dependencies and dependency trees from the repositories, all without running R. It also searches CRAN, and it finds problems in a library, such as missing or too old dependencies.

That last capability is the interesting one, because finding a broken library is exactly the job that normally requires starting R and running code to find out.

Installation sources are broad: CRAN, Bioconductor with the release that belongs to your R version, your own repositories and local paths, with version constraints such as a package pinned to an exact version. And on Linux, the pkg, proj and run commands install the system requirements of R packages, or print the commands to install them if rig cannot run them as root, which is the behaviour that makes those commands usable in a container where there is no root.

## rig proj: a manifest, a solver and a lockfile, all without running R

Project dependency management is the second experimental feature, and it is the most interesting design in the project.

rig proj manages an R project through an rproj.toml manifest. You add or remove dependencies, rig resolves them with its own built in solver into an rproj.lock lockfile, and then it syncs a project library to match, all without running R.

The phrase at the end is the point. The usual R project tooling, renv among them, works by running R, and it works by installing packages and recording what it installed. rig's approach is the other way round, a resolver that computes the versions and a lockfile that records the decision, and the library is then made to match the lockfile.

The feature list in that area is detailed. You can lock for several R versions and platforms at once, which matters when the same project is developed on a Mac and deployed on Linux. You can pin repositories and Bioconductor releases, ignore package versions newer than a date with the exclude-newer option, and upgrade only some packages while keeping the rest pinned.

Interoperability is handled explicitly. A project can be imported from or exported to a DESCRIPTION file or an renv lockfile, so an existing project can move in without rewriting its manifest, and an existing renv workflow can read what rig produced. You can also inspect a project's dependencies and dependency tree before installing anything, which is the cheap way to find out whether a resolution is going to be painful before it happens.

## Running R, self-contained scripts and the platform extras

The run group covers what you actually do with the toolchain.

rig run starts R, runs a script or an expression, or launches an application: Shiny apps, Plumber APIs, Quarto and R Markdown documents, and static sites, with the R version you choose.

The self-contained scripts feature is the most developer friendly idea in the project. You declare the R version and the packages a script needs in a script comment block, and rig run installs them into the script's own environment, and you can lock the versions next to the script with the project lock command for scripts. A single file therefore declares its own runtime and its own dependencies, and the machine it runs on does not have to be configured for it.

The platform extras are the small conveniences that show the tool has been used on real machines. On macOS there is a menu bar app that shows the default R version and lets you switch it interactively, and rig sets up R for debugging with lldb and enables core dumps. On Windows there is a command to associate R script files so they can be run directly from cmd and PowerShell.

There is shell auto completion for zsh and bash on macOS and Linux and for PowerShell on Windows, JSON output for scripting from the list, add and rtools add commands, and a rig config command for rig's own configuration.

The documentation is on the project website, and the README is generated from a README.qmd file, so the prose and the site come from the same source.

## The build, the packaging and the state of the project

The repository layout shows the range of platforms the tool supports, and it is a lot of platform.

There is a Rust source directory, a dev only xtask helper crate that is deliberately not a member dependency and never ships in the binary, a Rig.app directory for the macOS menu bar application, a choco directory for Chocolatey packaging, a containers directory, a website directory, a tools directory with the Dockerfiles for the Alpine and Ubuntu Linux builds, and a windows installer script for the Inno Setup based installer.

The Cargo manifest is worth a look for two decisions. The library is built as a static library under the name riglib, which is what lets the macOS app link the same code, and the manifest notes that the default members are intentionally left unset so that a plain cargo build at the root operates on the rig package only.

The dependency list is a good description of what the tool does. There is a CSV reader for the repository files, a fast Debian 822 parser for the DESCRIPTION and PACKAGES files, a crate for the platform data, cache and config directories, and then the compression formats in full, gzip, tar, xz, zstd and zip, because the tool unpacks Linux user mode builds, the Windows binary packages and the compressed package index. There is also a crate for running external commands and piping their output, and one for setting the modification time of downloaded files.

The compose file shows the Linux testing matrix, with Alpine and Ubuntu images built from the tools directory, and a shared cargo cache volume with a comment explaining why: putting the whole cargo home on one volume means concurrent containers share cargo's lock and serialise cache writes instead of clobbering each other.

The release cadence is steady, with 0.11.0 in October 2026 after 0.10.0 in September, and the version in the manifest is a development build, so the branch is ahead of the last tag. The project also records that it is not the only way to install R, since the alternative is the system package manager, and that rig's addition is the ability to hold several versions at once and to pin a project to one of them.

## Conclusion

Adopt rig if you need more than one R version on a machine, or if your CI has to reproduce an exact R and package set, because it handles the version management, the repository configuration and the lockfile in one tool that needs nothing installed alongside it. Do not adopt it if your organisation already pins R through the system package manager and a single project, since that is one less moving part. Before you use the experimental package and project commands, read the notes on them, because they are explicitly marked as such and they resolve dependencies without running R, which is powerful and different from what you may expect.

## FAQ

### What is rig?

rig is the R Installation Manager from Posit, a Rust tool that installs, removes and configures R versions, manages R packages and projects, and runs R, scripts and applications with a chosen R version. It is MIT licensed and distributed as a single standalone binary with no system requirements.

### How do I install and switch R versions with rig?

rig add release installs the latest R release, rig list shows the installed and the available versions, and rig default sets the version used by the terminal, RStudio and Positron. Versions can also be selected by symbolic name such as devel, next or oldrel, and quick links such as R-4.5.1 let several versions run at the same time.

### What is the difference between rig's admin mode and user mode?

The default admin mode installs R system wide, elevating to root or administrator only when needed, while the newer user mode installs everything into your home directory with no sudo or administrator rights, which means the R version and its packages belong to you rather than to the machine.

### What does rig proj do?

It manages an R project through an rproj.toml manifest, resolving dependencies with rig's own solver into an rproj.lock lockfile and syncing a project library to match, all without running R. You can lock for several R versions and platforms, pin repositories and Bioconductor releases, ignore versions newer than a date, and import or export from a DESCRIPTION file or an renv lockfile.

## Sources

- [License: MIT](https://github.com/r-lib/rig/blob/main/LICENSE)
- [Project website](http://rig.r-lib.org/)
- [README](https://github.com/r-lib/rig/blob/main/README.md)
- [Releases](https://github.com/r-lib/rig/releases)
- [r-lib/rig on GitHub](https://github.com/r-lib/rig)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/r-lib-rig
