Skip to content

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

Usage

meta_summary()

meta_list(pkg = NULL)

meta_update()

meta_clean(force = FALSE)

Arguments

pkg

Package names, if specified then only entries for pkg are returned.

force

If FALSE, then pak will ask for confirmation.

Value

meta_summary() returns a list with entries:

  • cachepath: absolute path of the metadata cache.

  • current_db: the file that contains the current metadata database. It is currently an RDS file, but this might change in the future.

  • raw_files: the files that are the downloaded PACKAGES* files.

  • db_files: all metadata database files.

  • size: total size of the metadata cache.

meta_list() returns a data frame of all available packages in the configured repositories.

meta_update() returns nothing.

meta_clean() returns nothing

Details

meta_summary() returns a summary of the metadata cache.

meta_list() lists all (or some) packages in the metadata database.

meta_update() updates the metadata database. You don't normally need to call this function manually, because all pak functions (e.g. pkg_install(), pkg_download(), etc.) call it automatically, to make sure that they use the latest available metadata.

meta_clean() deletes the whole metadata DB.

Examples

if (FALSE) {
# Metadata cache summary
meta_cummary()
}
if (FALSE) {
# The current metadata DB
meta_list()
# Selected packages only
meta_list(pkg = c("shiny", "htmlwidgets"))
}
if (FALSE) {
# Update the metadata DB
meta_update()
}
if (FALSE) {
# Delete the metadata DB
meta_clean()
}