clearExternalDir: Clear the external installation directory

View source: R/clearExternalDir.R

clearExternalDirR Documentation

Clear the external installation directory

Description

Clear the external installation directory by removing all or obsolete conda instances/environments. This can be used to free up some space if the expiry mechanism is not fast enough at deleting unused environments.

Usage

clearExternalDir(
  path = getExternalDir(),
  package = NULL,
  obsolete.only = FALSE
)

Arguments

path

String containing a path to the external directory containing the current conda installation and environments.

package

String containing the name of a client R package. If provided, all environments will be removed for this package.

obsolete.only

Logical scalar indicating whether to only remove environments for obsolete package versions.

Value

If package=NULL and obsolete.only=FALSE, all of the conda instances (and associated environments) in the external directory are destroyed. If obsolete.only=TRUE, the conda instances and environments associated with basilisk versions older than the current version are destroyed.

If package is supplied and obsolete.only=FALSE, all conda environments for the specified client package are destroyed. If obsolete.only=FALSE, only the environments for older versions of the client package are destroyed.

Author(s)

Aaron Lun

See Also

getExternalDir, which determines the location of the external directory.

installConda, for the motivation behind this function.

Examples

# We can't actually run clearExternalDir() here, as it 
# relies on basilisk already being installed.
print("dummy test to pass BiocCheck")


LTLA/basilisk.utils documentation built on April 13, 2024, 1:14 a.m.