clean: Remove Packages from the Library

View source: R/packrat.R

cleanR Documentation

Remove Packages from the Library

Description

Remove packages from the given library.

Usage

clean(
  packages = NULL,
  project = NULL,
  lib.loc = libDir(project),
  dry.run = FALSE,
  force = FALSE
)

Arguments

packages

A set of package names to remove from the project. When NULL, unused_packages is used to find packages unused in the project.

project

The project directory. Defaults to current working directory.

lib.loc

The library to clean. Defaults to the private package library associated with the project directory.

dry.run

Perform a dry run, returning records on which packages would have been moved by the current clean action.

force

Force package removal, even if they are still in use within the project?

Examples

## Not run: 

# Get unused package records
unused_packages()

# Clean all unused packages
clean()

# Clean specific packages
clean("foo")


## End(Not run)

packrat documentation built on Sept. 8, 2023, 5:44 p.m.