Skip to main content

uninstall

Function uninstall 

Source
pub fn uninstall(
    package: &InstalledPackage,
    profile: impl AsRef<Path>,
) -> Result<()>
Expand description

Remove all files that belong to an installed package from a profile directory.

Removes each file recorded in package.files() from the profile directory and cleans up any empty parent directories along the way.

ยงExamples

use loadsmith_core::InstalledPackage;
use loadsmith_install::uninstall;

// Load a previously installed package, then uninstall it.
uninstall(&package, "C:\\games\\Valheim\\profile").unwrap();