clearExternalDir: Clear the external installation directory

View source: R/clearExternalDir.R

clearExternalDirR Documentation

Clear the external installation directory


Clear the external installation directory by removing old Conda instances installed for different versions of basilisk with the same middle version number (i.e., same Bioconductor release).


clearExternalDir(path = getExternalDir())

clearObsoleteDir(path = getExternalDir())



String containing the path to the latest version of the directory of interest.


clearObsoleteDir can also be applied to the directories for the individual Conda environments, as the package version is also suffixed onto those directory paths. This is useful for clearing out obsolete versions of package environments.


For clearExternalDir, all conda instances (and associated environments) of the same Bioconductor release as the current basilisk installation are destroyed.

The same applies for clearObsoleteDir except that the conda instance generated by the latest basilisk installation is retained.


Aaron Lun

See Also

getExternalDir, which determines the location of the external directory.

installConda, for the motivation behind this function.


# 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 June 26, 2022, 4:06 a.m.