| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/clean.R |
| 3 |
\name{clean} |
| 4 |
\alias{clean} |
| 5 |
\title{Clean a project} |
| 6 |
\usage{ |
| 7 |
clean(project = NULL, ..., actions = NULL, prompt = interactive()) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{project}{The project directory. If \code{NULL}, then the active project will |
| 11 |
be used. If no project is currently active, then the current working |
| 12 |
directory is used instead.} |
| 13 |
|
| 14 |
\item{...}{Unused arguments, reserved for future expansion. If any arguments |
| 15 |
are matched to \code{...}, renv will signal an error.} |
| 16 |
|
| 17 |
\item{actions}{The set of clean actions to take. See the documentation in |
| 18 |
\strong{Actions} for a list of available actions, and the default actions |
| 19 |
taken when no actions are supplied.} |
| 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 project directory, invisibly. Note that this function is normally |
| 26 |
called for its side effects. |
| 27 |
} |
| 28 |
\description{ |
| 29 |
Clean up a project and its associated \R libraries. |
| 30 |
} |
| 31 |
\section{Actions}{ |
| 32 |
The following clean actions are available: |
| 33 |
|
| 34 |
\describe{ |
| 35 |
|
| 36 |
\item{\code{package.locks}}{ |
| 37 |
|
| 38 |
During package installation, \R will create package locks in the |
| 39 |
library path, typically named \verb{00LOCK-<package>}. On occasion, if package |
| 40 |
installation fails or \R is terminated while installing a package, these |
| 41 |
locks can be left behind and will inhibit future attempts to reinstall |
| 42 |
that package. Use this action to remove such left-over package locks. |
| 43 |
|
| 44 |
} |
| 45 |
|
| 46 |
\item{\code{library.tempdirs}}{ |
| 47 |
|
| 48 |
During package installation, \R may create temporary directories with |
| 49 |
names of the form \verb{file\\w\{12\}}, and on occasion those files can be |
| 50 |
left behind even after they are no longer in use. Use this action to |
| 51 |
remove such left-over directories. |
| 52 |
} |
| 53 |
|
| 54 |
\item{\code{system.library}}{ |
| 55 |
|
| 56 |
In general, it is recommended that only packages distributed with \R |
| 57 |
are installed into the default library (the library path referred to |
| 58 |
by \code{.Library}). Use this action to remove any user-installed packages |
| 59 |
that have been installed to the system library. |
| 60 |
|
| 61 |
Because this action is destructive, it is by default never run -- it |
| 62 |
must be explicitly requested by the user. |
| 63 |
|
| 64 |
} |
| 65 |
|
| 66 |
\item{\code{unused.packages}}{ |
| 67 |
|
| 68 |
Remove packages that are installed in the project library, but no longer |
| 69 |
appear to be used in the project sources. |
| 70 |
|
| 71 |
Because this action is destructive, it is by default only run in |
| 72 |
interactive sessions when prompting is enabled. |
| 73 |
|
| 74 |
} |
| 75 |
|
| 76 |
} |
| 77 |
} |
| 78 |
|
| 79 |
\examples{ |
| 80 |
\dontrun{ |
| 81 |
|
| 82 |
# clean the current project |
| 83 |
renv::clean() |
| 84 |
|
| 85 |
} |
| 86 |
} |