BCUninstaller/Bulk-Crap-Uninstaller · error · IOException

List is empty

Error message

List is empty

What it means

Thrown by the BCU console's uninstall command after it reads the supplied uninstall list file. The file was found and readable, but UninstallList.ReadFromFile returned null or a list whose Filters collection is empty. An empty filter set cannot match any installed applications, so the command aborts and reports the file as invalid. It is wrapped in a SystemException catch that surfaces it as an invalid-syntax error to the user.

Source

Thrown at source/BCU-console/Program.cs:217

            ApplicationEntrySerializer.SerializeApplicationEntries(args[0], apps);
            Console.WriteLine(@"Success!");
            return 0;
        }

        private static int ProcessUninstallCommand(string[] args)
        {
            if (args.Length < 1)
                return ShowInvalidSyntaxError("Missing path argument");

            if (!File.Exists(args[0]))
                return ShowInvalidSyntaxError("Invalid path or missing list file");

            UninstallList list;
            try
            {
                list = UninstallList.ReadFromFile(args[0]);
                if (list == null || list.Filters.Count == 0)
                    throw new IOException("List is empty");
            }
            catch (SystemException ex)
            {
                return ShowInvalidSyntaxError(
                    $"Invalid or damaged uninstall list file - \"{args[0]}\"\nError: {ex.Message}\n");
            }

            var isVerbose = args.Any(x => x.Equals("/V", StringComparison.OrdinalIgnoreCase));
            var isQuiet = args.Any(x => x.Equals("/Q", StringComparison.OrdinalIgnoreCase));
            var isUnattended = args.Any(x => x.Equals("/U", StringComparison.OrdinalIgnoreCase));

            int junkArgumentIndex = Array.FindIndex(args, a => a.Equals("/J", StringComparison.OrdinalIgnoreCase));
            string junkArg = args.Where(a => a.Equals("/J", StringComparison.OrdinalIgnoreCase) || a.StartsWith("/J=", StringComparison.OrdinalIgnoreCase)).FirstOrDefault() ?? string.Empty;
            ConfidenceLevel? junkConfidenceLevel = null;
            if(junkArg.IsNotEmpty()) {
                string[] junkSplit = junkArg.Split('=', 2);
                junkConfidenceLevel = ConfidenceLevel.VeryGood;
                if (junkSplit.Length == 2) {

View on GitHub (pinned to 608321de98)

Solutions

  1. Re-export the uninstall list from the BCU GUI with at least one application selected.
  2. Open the file and confirm it contains filter entries; if it is empty or null-parsed, regenerate it.
  3. Verify the file is a genuine BCU uninstall list (correct format) and not a different XML/JSON export.
  4. Pass the correct list file path as the first positional argument.

Example fix

// before
bcu-uninstall empty.cuil  // list exported with no selection
// after
// In BCU GUI: select >=1 app, File > Export uninstall list, then:
bcu-uninstall myapps.cuil
Defensive patterns

Strategy: validation

Validate before calling

// Validate the list before driving the uninstall
var list = UninstallList.ReadFromFile(path);
if (list == null || list.Filters.Count == 0)
{
    Console.Error.WriteLine($"List file '{path}' contains no filters.");
    return 1;
}

Prevention

When it happens

Trigger: Running `BCU-console uninstall <file>` where <file> is an exported uninstall list containing zero filter entries; the file deserialized to null; the file was manually edited and all filter entries were removed; passing a path to a non-list file that happens to parse to an empty list.

Common situations: User exported an empty selection from the BCU GUI; the wrong file was passed as the first argument (e.g. a settings file); the list file was truncated or corrupted so the filters section did not deserialize.

Related errors


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