Search code examples
powershellchocolatey

Uninstall package and its dependencies


I'm trying to uninstall a private package, but because it is used by others packages Chocolatey show me this:

Unable to uninstall 'tibco-businessworks 6.5.1' because 'bw_6.5.1_hf_002 6.5.1.002, tibco_bwpluginibmi 7.2.0' depend on it.

The problem is when I use this command

choco uninstall tibco-businessworks -forcedependencies  

Chocolatey shows me the same message as before. I need it to uninstall leaf packages after that uninstall root package.


Solution

  • Chocolatey is trying to prevent other packages (and therefore their underlying applications) from no-longer working, by respecting the dependency chain that exists for the packages.

    As per the documentation, the --forcedependencies option is used to:

    Uninstall dependencies when uninstalling package(s-). Defaults to false.

    It does not have any impact on your current situation, since Chocolatey is telling your that other packages have a dependency on the package that you are trying to uninstall.

    In order to remove the tibco-businessworks package, you will have to first remove the bw_6.5.1_hf_002 and tibco_bwpluginibmi packages.