Skip to contents

Delete cached Metro SP data

Usage

metrosp_cache_clear(vintage = NULL)

Arguments

vintage

Vintage to remove, such as "latest" or "2026-09". When NULL, removes every package-managed data-latest or data-YYYY-MM vintage directory. The cache root and unrelated files are preserved.

Value

The number of files removed, invisibly.

See also

metrosp_cache() to inspect cached files.

Examples

# Point the cache at a temporary directory so the example leaves yours alone.
old <- options(metrosp.cache_dir = tempfile("metrosp-cache"))

metrosp_cache_clear("2026-09")
#> ℹ Nothing cached in /tmp/Rtmp2knhgo/metrosp-cache1f5cd71158b.
metrosp_cache_clear()
#> ℹ Nothing cached in /tmp/Rtmp2knhgo/metrosp-cache1f5cd71158b.

options(old)