Skip to main content

clean

Function clean 

Source
pub fn clean(cfg: &Config, all: bool) -> Result<CleanReport, PkgError>
Expand description

Remove cached packages.

With all = true, removes the entire <pkg_dir>/cache directory. Otherwise reads the lockfile, collects the set of in-use SHAs, and recursively deletes any 40-hex SHA directory under <cache>/git/ that is not in that set. A missing lockfile is reported, not an error.

Never touches <pkg_dir>/vendored; dangling symlinks there are repaired by the next install.