rv upgrade
rv
will resolve packages from the source and the version it is locked at.
rv upgrade
will ignore the lockfile, re-resolve, and install changed packages. This does not guarantee packages will be
installed from the same repository, simply installs packages as if there was no lockfile present.
Usage:
Section titled “Usage:”rv upgrade [OPTIONS]
Options
Section titled “Options”--dry-run
- No changes made, only reports what would happen if the command was run.
Example
Section titled “Example”In this example, we will start with the following config and lock files:
[project]name = "upgrade"r_version = "4.4"
repositories = [ { alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },]
dependencies = [ "R6",]
# This file is automatically @generated by rv.# It is not intended for manual editing.version = 2r_version = "4.4"
[[packages]]name = "R6"version = "2.5.1"source = { repository = "https://packagemanager.posit.co/cran/2025-01-01" }force_source = falsedependencies = []
Adding a new repository as the first repository in the config does not change the project since R6
is locked to be
installed from PPM
:
[project]name = "upgrade"r_version = "4.4"
repositories = [ { alias = "PPM_new", url = "https://packagemanager.posit.co/cran/latest" }, { alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },]
dependencies = [ "R6",]
% rv syncNothing to do
# This file is automatically @generated by rv.# It is not intended for manual editing.version = 2r_version = "4.4"
[[packages]]name = "R6"version = "2.5.1"source = { repository = "https://packagemanager.posit.co/cran/2025-01-01" }force_source = falsedependencies = []
Running rv upgrade
ignores the lockfile and is resolved to come from the first repository, PPM_new
.
% rv upgrade- R6+ R6 (2.6.1, binary from https://packagemanager.posit.co/cran/latest) in 0ms
# This file is automatically @generated by rv.# It is not intended for manual editing.version = 2r_version = "4.4"
[[packages]]name = "R6"version = "2.6.1"source = { repository = "https://packagemanager.posit.co/cran/latest" }force_source = falsedependencies = []