rig cache

rig caches files it downloads (R binary indexes, CRAN-like package databases, package DESCRIPTION manifests, downloaded package files, and packages rig built from source) in an OS-specific cache directory, so it does not have to re-download them on every run. See rig system dirs --cache for the cache directory path.

The global --no-cache flag makes rig skip this cache entirely for the current run; it does not affect what rig cache reports or deletes.

Subcommands

clean
Delete cached files
info
Show cache size and contents

rig cache clean

Deletes files from rig’s cache directory. With no options, deletes the whole cache. Use --category to delete only one category of cached files (built, packages, metadata or p3m), leaving the rest in place. See rig cache info for what each category contains.

Usage

rig cache clean [OPTIONS]

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
--category <category>
Only delete this category of cached files [possible values: built, packages, metadata, p3m]
-h, --help
Print help (see a summary with ‘-h’)
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)

rig cache info

Prints the total size of rig’s cache directory, broken down into categories: packages rig built from source, downloaded package files, package metadata (binary package indexes, CRAN-like package databases, package manifests, and repository data), and the cached P3M status document.

Use --json for machine-readable output.

Usage

rig cache info [OPTIONS]

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)