This is the mechanism by which install.packages determines which packages should be installed from where. With this override, we can indicate arbitrary repos, Package, File for each individual package.

availablePackagesOverride(toInstall, repos, purge, type = getOption("pkgType"))



A pkgDT object


The remote repository (e.g., a CRAN mirror), passed to either install.packages, install_github or installVersions.


Logical. Should all caches be purged? Default is getOption("Require.purge", FALSE). There is a lot of internal caching of results throughout the Require package. These help with speed and reduce calls to internet sources. However, sometimes these caches must be purged. The cached values are renewed when found to be too old, with the age limit. This maximum age can be set in seconds with the environment variable R_AVAILABLE_PACKAGES_CACHE_CONTROL_MAX_AGE, or if unset, defaults to 3600 (one hour -- see utils::available.packages).

Internally, there are calls to available.packages.


See utils::install.packages