Removes files fetched from data repositories by data_check / code_check
from the on-disk cache (see repo_cache_dir()). The cache only speeds up
re-runs — anything deleted is simply re-downloaded when next needed — so
clearing it is always safe; the usual reason is to reclaim disk space after a
large corpus build.
Details
By default the whole cache is removed. Pass repo_url to remove only the
cached files of specific repositories.
Examples
# a cache in a temporary folder, so no real cache is cleared
old <- options(metacheck.repo_cache.dir = file.path(tempdir(), "repo_cache"))
repo_cache_clear()
#> Cleared the repository file cache (0 bytes freed).
# clear one repository only
repo_cache_clear("https://osf.io/abcde")
#> Cleared 0 cached repositories (0 bytes freed).
options(old)
