Learn R Programming

renv (version 0.3.0-40)

purge: Purge Packages from the Cache

Description

Purge packages from the cache. This can be useful if a package which had previously been installed in the cache has become corrupted or unusable, and needs to be reinstalled.

Usage

purge(package, version = NULL, hash = NULL, confirm = interactive())

Arguments

package

A single package to be removed from the cache.

version

The package version to be removed. When NULL, all versions of the requested package will be removed.

hash

The specific hashes to be removed. When NULL, all hashes associated with a particular package's version will be removed.

confirm

Boolean; prompt the user before taking any action?

Details

purge() is an inherently destructive option. It removes packages from the cache, and so any project which had symlinked that package into its own project library would find that package now unavailable. These projects would hence need to reinstall any purged packages. Take heed of this in case you're looking to purge the cache of a package which is difficult to install, or if the original sources for that package are no longer available!