| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/purge.R |
| 3 |
\name{purge} |
| 4 |
\alias{purge} |
| 5 |
\title{Purge packages from the cache} |
| 6 |
\usage{ |
| 7 |
purge(package, ..., version = NULL, hash = NULL, prompt = interactive()) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{package}{A single package to be removed from the cache.} |
| 11 |
|
| 12 |
\item{...}{Unused arguments, reserved for future expansion. If any arguments |
| 13 |
are matched to \code{...}, renv will signal an error.} |
| 14 |
|
| 15 |
\item{version}{The package version to be removed. When \code{NULL}, all versions |
| 16 |
of the requested package will be removed.} |
| 17 |
|
| 18 |
\item{hash}{The specific hashes to be removed. When \code{NULL}, all hashes |
| 19 |
associated with a particular package's version will be removed.} |
| 20 |
|
| 21 |
\item{prompt}{Boolean; prompt the user before taking any action? For backwards |
| 22 |
compatibility, \code{confirm} is accepted as an alias for \code{prompt}.} |
| 23 |
} |
| 24 |
\value{ |
| 25 |
The set of packages removed from the renv global cache, |
| 26 |
as a character vector of file paths. |
| 27 |
} |
| 28 |
\description{ |
| 29 |
Purge packages from the cache. This can be useful if a package which had |
| 30 |
previously been installed in the cache has become corrupted or unusable, |
| 31 |
and needs to be reinstalled. |
| 32 |
} |
| 33 |
\details{ |
| 34 |
\code{purge()} is an inherently destructive option. It removes packages from the |
| 35 |
cache, and so any project which had symlinked that package into its own |
| 36 |
project library would find that package now unavailable. These projects would |
| 37 |
hence need to reinstall any purged packages. Take heed of this in case you're |
| 38 |
looking to purge the cache of a package which is difficult to install, or |
| 39 |
if the original sources for that package are no longer available! |
| 40 |
} |
| 41 |
\examples{ |
| 42 |
\dontrun{ |
| 43 |
|
| 44 |
# remove all versions of 'digest' from the cache |
| 45 |
renv::purge("digest") |
| 46 |
|
| 47 |
# remove only a particular version of 'digest' from the cache |
| 48 |
renv::purge("digest", version = "0.6.19") |
| 49 |
|
| 50 |
} |
| 51 |
} |