BCUninstaller/Bulk-Crap-Uninstaller · warning · ArgumentException

Selected update was not found

Error message

Selected update was not found

What it means

ArgumentException thrown by UpdateManager.UninstallUpdate when the WUA search (Type='Software' and IsInstalled=1 and UpdateID='<id>' and IsPresent=1) returns no IUpdate results. The updateId does not correspond to any installed, present software update on this machine, so there is nothing to uninstall.

Source

Thrown at source/WinUpdateHelper/UpdateManager.cs:27

using System.Runtime.InteropServices;
using System.Threading;
using Klocman;
using WUApiLib;

namespace WinUpdateHelper
{
    internal static class UpdateManager
    {
        public static void UninstallUpdate(string updateId)
        {
            Console.WriteLine("Scanning updates...");
            var wuaSession = new UpdateSessionClass();
            var wuaSearcher = wuaSession.CreateUpdateSearcher();
            var wuaSearch =
                wuaSearcher.Search($"Type='Software' and IsInstalled=1 and UpdateID='{updateId}' and IsPresent=1");
            var updates = wuaSearch.Updates.OfType<IUpdate>().ToList();
            if (!updates.Any())
                throw new ArgumentException("Selected update was not found");
            var uninstallable = updates.Where(x => x.IsUninstallable).ToList();
            if (!uninstallable.Any())
                throw new ArgumentException("Selected update is not uninstallable");

            var wuaInstaller = wuaSession.CreateUpdateInstaller();
            wuaInstaller.Updates = new UpdateCollectionClass();
            foreach (var update in uninstallable)
                wuaInstaller.Updates.Add(update);

            Console.WriteLine("Uninstalling " + string.Join("; ", uninstallable.Select(x => x.Title)) + "...");
            WaitForInstallerBusy(wuaInstaller);
            var result = wuaInstaller.Uninstall();
            WaitForInstallerBusy(wuaInstaller);

            switch (result.ResultCode)
            {
                case OperationResultCode.orcNotStarted:
                    throw new ArgumentException("Selected update is not uninstallable");

View on GitHub (pinned to 608321de98)

Solutions

  1. Run 'list' on the target machine to confirm the UpdateID is currently installed and present before calling uninstall.
  2. Verify you are using the correct UpdateID + RevisionNumber (list prints both).
  3. If the update is a driver, note the tool only handles Type='Software'.
  4. Re-scan: the update may have been replaced; pick the current equivalent update.

Example fix

// before - blind uninstall with an ID from another host
WinUpdateHelper.exe uninstall deadbeef-...

// after - look up the live ID first, then uninstall
WinUpdateHelper.exe list   // copy the real UpdateID
WinUpdateHelper.exe uninstall <id-from-list>
Defensive patterns

Strategy: validation

Validate before calling

// Use the 'list' command to confirm the ID is installed+present before uninstalling.
var installed = ListInstalledUpdateIds();
if (!installed.Contains(updateId)) throw new ArgumentException("Selected update was not found");

Type guard

bool UpdateIsInstalledAndPresent(string updateId)
{
    var searcher = new UpdateSessionClass().CreateUpdateSearcher();
    var r = searcher.Search($"Type='Software' and IsInstalled=1 and UpdateID='{updateId}' and IsPresent=1");
    return r.Updates.Count > 0;
}

Prevention

When it happens

Trigger: Passing an UpdateID that is not installed, was already uninstalled, is a driver (Type!='Software'), is not IsPresent, or simply does not exist. The search criteria are strict: all four conditions must match.

Common situations: Stale UpdateID copied from another machine. The update was superseded/removed by Windows since it was listed. ID belongs to a driver or definition update excluded by Type='Software'. IsPresent=0 because the payload is cached but not deployed. Running on a machine where the update was never applicable.

Related errors


AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13). Data as JSON: /api/errors/7e7c1ef1f5ef8e05. Report an issue: GitHub.