Skip to content

BCU-console: add --dry-run / /N no-op flag for uninstall and junk cleanup #947

Description

@chirag127

Summary

BCU-console uninstall list.bcul /U /J runs unattended and irreversibly, and there is no way to preview which uninstallers would fire or which junk files/registry keys would be deleted without actually deleting.

This is uncomfortable in the exact context BCU-console was built for: IT-pro scripting, imaging pipelines, mass deployments.

Proposal (additive)

Add /N (or --dry-run long form) to the uninstall subcommand in source/BCU-console/Program.cs:

  • Same discovery + list-resolution path.
  • Print exactly what would be uninstalled: display name, uninstall command line, kind (MSI / NSIS / InnoSetup / Scoop / Chocolatey / Store / …).
  • With /J=<Level>, also print each junk item (path + confidence) that would be removed at that level.
  • Perform no registry writes, no process kills, no file deletions.
  • Exit 0 on successful preview, non-zero if the list resolves to nothing.

Why now

Existing warning text in the help output —

/U — Unattended mode … WARNING: ONLY USE AFTER THOROUGH TESTING

— acknowledges the risk, but there is no low-risk way to do that testing. Dry-run makes the warning actionable.

Bonus: pairs perfectly with the JSON-output request (see #946) — dry-run + JSON = machine-verifiable diff before a rollout.

Related

Version

BCU v6.2.0.0 on Windows 11.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions