| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/remove.R |
| 3 |
\name{remove} |
| 4 |
\alias{remove} |
| 5 |
\title{Remove packages} |
| 6 |
\usage{ |
| 7 |
remove(packages, ..., library = NULL, project = NULL) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{packages}{A character vector of \R packages to remove.} |
| 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{library}{The library from which packages should be removed. When |
| 16 |
\code{NULL}, the active library (that is, the first entry reported in |
| 17 |
\code{.libPaths()}) is used instead.} |
| 18 |
|
| 19 |
\item{project}{The project directory. If \code{NULL}, then the active project will |
| 20 |
be used. If no project is currently active, then the current working |
| 21 |
directory is used instead.} |
| 22 |
} |
| 23 |
\value{ |
| 24 |
A vector of package records, describing the packages (if any) which |
| 25 |
were successfully removed. |
| 26 |
} |
| 27 |
\description{ |
| 28 |
Remove (uninstall) \R packages. |
| 29 |
} |
| 30 |
\examples{ |
| 31 |
|
| 32 |
\dontrun{ |
| 33 |
|
| 34 |
# disable automatic snapshots |
| 35 |
auto.snapshot <- getOption("renv.config.auto.snapshot") |
| 36 |
options(renv.config.auto.snapshot = FALSE) |
| 37 |
|
| 38 |
# initialize a new project (with an empty R library) |
| 39 |
renv::init(bare = TRUE) |
| 40 |
|
| 41 |
# install digest 0.6.19 |
| 42 |
renv::install("[email protected]") |
| 43 |
|
| 44 |
# save library state to lockfile |
| 45 |
renv::snapshot() |
| 46 |
|
| 47 |
# remove digest from library |
| 48 |
renv::remove("digest") |
| 49 |
|
| 50 |
# check library status |
| 51 |
renv::status() |
| 52 |
|
| 53 |
# restore lockfile, thereby reinstalling digest 0.6.19 |
| 54 |
renv::restore() |
| 55 |
|
| 56 |
# restore automatic snapshots |
| 57 |
options(renv.config.auto.snapshot = auto.snapshot) |
| 58 |
|
| 59 |
} |
| 60 |
} |