static int RemoveMain(Options opts)
{
var appsPresent = opts.ToRemove.AsEnumerable();
foreach (var key in GetUninstallBaseKeys())
{
appsPresent = key.RemoveApps(appsPresent);
if (appsPresent.Count() == 0)
return 0;
}
// Couldn't remove all the apps
string joined = string.Join(", ", appsPresent);
return RaiseError(Errors.RemoveFailed, $"Unable to remove these apps: {joined}");
}