Various utilities to inspect and clean the package cache. See the pkgcache package if you need for control over the package cache.

cache_summary()

cache_list(...)

cache_delete(...)

cache_clean()

Arguments

...

For cache_list() and cache_delete(), ... may contain filters, where the argument name is the column name. E.g. package, version, etc. Call cache_list() without arguments to see the available column names. If you call cache_delete() without arguments, it will delete all cached files.

Value

cache_summary() returns a list with elements:

  • cachepath: absolute path to the package cache

  • files: number of files (packages) in the cache

  • size: total size of package cache in bytes

cache_list() returns a data frame with the data about the cache. cache_delete() returns nothing. cache_clean() returns nothing.

Details

cache_summary() returns a summary of the package cache.

cache_list() lists all (by default), or a subset of packages in the package cache.

cache_delete() deletes files from the cache.

cache_clean() deletes all files from the cache.

Examples

if (FALSE) {
# Summary
cache_summary()
}
if (FALSE) {
# List packages
cache_list()
cache_list(package = "recipes")
cache_list(platform = "source")
}
if (FALSE) {
# Delete packages
cache_delete(package = "knitr")
cache_delete(platform = "macos")
}
if (FALSE) {
cache_clean()
}