protected async Task UninstallPackageByIdAsync(
            NuGetProject project,
            string packageId,
            UninstallationContext uninstallContext,
            INuGetProjectContext projectContext,
            bool isPreview)
        {
            ConsoleHostNuGetPackageManager   packageManager = ConsoleHost.CreatePackageManager();
            IEnumerable <NuGetProjectAction> actions        = await packageManager.PreviewUninstallPackageAsync(project, packageId, uninstallContext, projectContext, ConsoleHost.Token);

            if (isPreview)
            {
                PreviewNuGetPackageActions(actions);
            }
            else
            {
                await packageManager.ExecuteNuGetProjectActionsAsync(project, actions, projectContext, ConsoleHost.Token);
            }
        }