pub fn uninstall_package(
package_manager: &PackageManager,
package: &str,
) -> Result<(), Box<dyn Error>>Expand description
Uninstalls a package using the specified package manager.
This function runs the appropriate remove command for the given package manager.
§Arguments
package_manager- A reference to thePackageManagerenum representing the system’s package manager.package- A string slice containing the name of the package to uninstall.
§Returns
Returns a Result indicating success or an error if the uninstallation process fails.