rv configure repository replace
Replace an existing repository entry, keeping the original alias unless otherwise specified.
rv configure repository replace <OLD_ALIAS> --url <URL> [OPTIONS]Arguments
Section titled “Arguments”OLD_ALIAS- The repository alias to replace
Options
Section titled “Options”--url <URL>- The url of the repository to replace--alias <ALIAS>- New repository alias. Will keep the original alias if not specified.--force-source- Enableforce_sourcefor this repository
Example
Section titled “Example”Starting with the following configuration:
[project]name = "configure"repositories = [ { alias = "CRAN", url = "https://cran.r-project.org" }, { alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },]We update the CRAN alias to be the latest Posit Package Manager url and enable the force_source option using the following command:
rv configure repository replace CRAN --url "https://packagemanager.posit.co/cran/latest" --force-source[project]name = "configure"repositories = [ { alias = "CRAN", url = "https://packagemanager.posit.co/cran/latest", force_source = true }, { alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },]Repository replaced successfully - new alias: 'CRAN', URL: https://packagemanager.posit.co/cran/latest