windows 10 – “We couldn’t complete the updates. Undoing changes” endless loop

I need help, everytime I start/restart/shutdown my computer, it tries to install Windows Updates and fails, and showing this:

enter image description here

I am able to boot into my computer normally and use it without problems AFTER A RATHER LONG WAIT

I have run the following:

dism /online /cleanup-image /startcomponentcleanup
dism /online /cleanup-image /scanhealth
dism /online /cleanup-image /restorehealth
dism /online /cleanup-image /restorehealth /source:E:sourcesinstall.wim
sfc /scannow

Countless times, needless to say, no corruption detected and everything fixed——except this endless update failure loop…

I want to uninstall these updates, but they haven’t been properly installed;

I opened appwiz.cplinstalled updates, identified four updates that might had caused the problem:

enter image description here

Only KB4580419 has an “Uninstall” option, the other three don’t have.

Tried these, observed no effect;

wusa /uninstall /kb:4594440 /quiet /norestart
wusa /uninstall /kb:4562830 /quiet /norestart
wusa /uninstall /kb:4593175 /quiet /norestart
wusa /uninstall /kb:4580419 /quiet /norestart

Removed /quiet argument and tried to uninstall one update, it opened Windows Update Standalone Installer, it runs and hangs, in taskmgr its status is suspended, clicked cancel without effect, fortunately I can kill it in taskmgr;

I had run this:

dism /online /get-packages /format:table

Found a lot packages with state “Install Pending” and “Staged”

Ran this:

(Get-WindowsPackage -Online | Where {$_.PackageState -eq "Staged" -or $_.PackageState -eq "InstallPending"}).PackageName

The result:

Microsoft-OneCore-DeveloperMode-Desktop-Package~31bf3856ad364e35~amd64~~10.0.19041.662
Microsoft-OneCore-Graphics-Tools-Package~31bf3856ad364e35~amd64~~10.0.19041.488
Microsoft-WebDriver-Package~31bf3856ad364e35~amd64~~10.0.19041.610
Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.662
Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~fr-FR~10.0.19041.662
Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~zh-CN~10.0.19041.662
Microsoft-Windows-Hello-Face-Package~31bf3856ad364e35~amd64~~10.0.19041.662
Microsoft-Windows-LanguageFeatures-Handwriting-zh-cn-Package~31bf3856ad364e35~amd64~~10.0.19041.488
Microsoft-Windows-Media-Features-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.488
Microsoft-Windows-Media-Features-Package~31bf3856ad364e35~amd64~fr-FR~10.0.19041.488
Microsoft-Windows-Media-Features-Package~31bf3856ad364e35~amd64~zh-CN~10.0.19041.488
Microsoft-Windows-Media-Features-Package~31bf3856ad364e35~amd64~~10.0.19041.685
Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.19041.546
Microsoft-Windows-Notepad-FoD-Package~31bf3856ad364e35~amd64~fr-FR~10.0.19041.488
Microsoft-Windows-Notepad-FoD-Package~31bf3856ad364e35~amd64~zh-CN~10.0.19041.488
Microsoft-Windows-Printing-WFS-FoD-Package~31bf3856ad364e35~amd64~fr-FR~10.0.19041.488
Microsoft-Windows-Printing-WFS-FoD-Package~31bf3856ad364e35~amd64~zh-CN~10.0.19041.488
Microsoft-Windows-StorageManagement-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.488
Microsoft-Windows-StorageManagement-FoD-Package~31bf3856ad364e35~amd64~fr-FR~10.0.19041.488
Microsoft-Windows-StorageManagement-FoD-Package~31bf3856ad364e35~amd64~zh-CN~10.0.19041.488
Microsoft-Windows-StorageManagement-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.662
Microsoft-Windows-UserExperience-Desktop-Package~31bf3856ad364e35~amd64~~10.0.19041.662
Microsoft-Windows-WordPad-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.662
Microsoft-Windows-Xps-Xps-Viewer-Opt-Package~31bf3856ad364e35~amd64~~10.0.19041.662
Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4300.1
Package_for_KB4562830~31bf3856ad364e35~amd64~~10.0.1.3
Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.685.1.6

Then I ran this:

(Get-WindowsPackage -Online | Where {$_.PackageState -eq "Staged" -or $_.PackageState -eq "InstallPending"}).PackageName | %{dism /Online /Remove-Package /PackageName:${_} /norestart}

Found $SysReset, $WINDOWS.~BT, $WinREAgent, Recovery, “System Volume Information” folders in C:, their contents:

C:$SysResetCloudImage
C:$SysResetLogs
C:$SysResetMDM
C:$SysResetOldOS
C:$SysResetScratch
C:$SysResetLogsPushButtonReset.etl
C:$SysResetLogsSessionID.xml
C:$SysResetLogssetupact.log
C:$SysResetLogssetuperr.log
C:$SysResetLogsTimestamp.xml
C:$WINDOWS.~BTSources
C:$WINDOWS.~BTSourcesPanther
C:$WINDOWS.~BTSourcesPantheractionable.xsl
C:$WINDOWS.~BTSourcesPantherAltData.cab
C:$WINDOWS.~BTSourcesPantherappraiser.sdb
C:$WINDOWS.~BTSourcesPantherAppraiser_Data.ini
C:$WINDOWS.~BTSourcesPantherAppraiser_TelemetryRunList.xml
C:$WINDOWS.~BTSourcesPantherCompatData_2020_12_18_13_43_45_3_00000021.xml
C:$WINDOWS.~BTSourcesPantherCompatData_2020_12_18_13_43_48_3_00000021.xml
C:$WINDOWS.~BTSourcesPanthercompatscancache.dat
C:$WINDOWS.~BTSourcesPantherDeviceBlock_Modern.xsl
C:$WINDOWS.~BTSourcesPantherdiagerr.xml
C:$WINDOWS.~BTSourcesPantherdiagwrn.xml
C:$WINDOWS.~BTSourcesPantherDissmissable_Modern.xsl
C:$WINDOWS.~BTSourcesPantherFull.xsl
C:$WINDOWS.~BTSourcesPantherfull_connected.xsl
C:$WINDOWS.~BTSourcesPantherIB85T7xeB0WQR8TH.4.4.0.0_APPRAISER_EverythingSys.bin
C:$WINDOWS.~BTSourcesPantherIB85T7xeB0WQR8TH.4.4.0.0_APPRAISER_HumanReadable.xml
C:$WINDOWS.~BTSourcesPantherIB85T7xeB0WQR8TH.4.4.0.0_APPRAISER_SetupOutput.xml
C:$WINDOWS.~BTSourcesPantherIB85T7xeB0WQR8TH.4.4.0.0_APPRAISER_SetupOutputHw.xml
C:$WINDOWS.~BTSourcesPantherie6png.js
C:$WINDOWS.~BTSourcesPantherimg
C:$WINDOWS.~BTSourcesPanthermodern.xsl
C:$WINDOWS.~BTSourcesPanthernamedTemplates.xsl
C:$WINDOWS.~BTSourcesPantherOverview.xsl
C:$WINDOWS.~BTSourcesPantherOverview_connected.xsl
C:$WINDOWS.~BTSourcesPantherPreDownload_AppUninstall.xsl
C:$WINDOWS.~BTSourcesPantherResources
C:$WINDOWS.~BTSourcesPantherSave.xsl
C:$WINDOWS.~BTSourcesPantherSave_connected.xsl
C:$WINDOWS.~BTSourcesPantherScanResult.xml
C:$WINDOWS.~BTSourcesPanthersetupact.log
C:$WINDOWS.~BTSourcesPanthersetuperr.log
C:$WINDOWS.~BTSourcesPantherSetupReports.css
C:$WINDOWS.~BTSourcesPanthersetupReportsLoc.css
C:$WINDOWS.~BTSourcesPanthersetup_strings.xml
C:$WINDOWS.~BTSourcesPantherSummaryInfo_Modern.xsl
C:$WINDOWS.~BTSourcesPantherSummaryReport.html
C:$WINDOWS.~BTSourcesPanthertables.js
C:$WINDOWS.~BTSourcesPantherurls.xml
C:$WINDOWS.~BTSourcesPantherwica_strings.xml
C:$WINDOWS.~BTSourcesPantherwindlp.state-old.xml
C:$WINDOWS.~BTSourcesPantherwindlp.state.xml
C:$WINDOWS.~BTSourcesPantherimgdefaultApp.png
C:$WINDOWS.~BTSourcesPantherimgdefaultPlugins.png
C:$WINDOWS.~BTSourcesPantherimgdevice_battery.png
C:$WINDOWS.~BTSourcesPantherimgdevice_biometric.png
C:$WINDOWS.~BTSourcesPantherimgdevice_bluetooth.png
C:$WINDOWS.~BTSourcesPantherimgdevice_cdrom.png
C:$WINDOWS.~BTSourcesPantherimgdevice_default.png
C:$WINDOWS.~BTSourcesPantherimgdevice_diskdrive.png
C:$WINDOWS.~BTSourcesPantherimgdevice_display.png
C:$WINDOWS.~BTSourcesPantherimgdevice_floppydisk.png
C:$WINDOWS.~BTSourcesPantherimgdevice_hidclass.png
C:$WINDOWS.~BTSourcesPantherimgdevice_image.png
C:$WINDOWS.~BTSourcesPantherimgdevice_keyboard.png
C:$WINDOWS.~BTSourcesPantherimgdevice_modem.png
C:$WINDOWS.~BTSourcesPantherimgdevice_monitor.png
C:$WINDOWS.~BTSourcesPantherimgdevice_mouse.png
C:$WINDOWS.~BTSourcesPantherimgdevice_mtd.png
C:$WINDOWS.~BTSourcesPantherimgdevice_net.png
C:$WINDOWS.~BTSourcesPantherimgdevice_pcmcia.png
C:$WINDOWS.~BTSourcesPantherimgdevice_printer.png
C:$WINDOWS.~BTSourcesPantherimgdevice_sensor.png
C:$WINDOWS.~BTSourcesPantherimgdevice_smartcardreader.png
C:$WINDOWS.~BTSourcesPantherimgdevice_tapedrive.png
C:$WINDOWS.~BTSourcesPantherimgdevice_usb.png
C:$WINDOWS.~BTSourcesPantherimgfailure.png
C:$WINDOWS.~BTSourcesPantherimgsetupactiondefault.png
C:$WINDOWS.~BTSourcesPantherimgwarning.png
C:$WINDOWS.~BTSourcesPantherimgwontwork.png
C:$WINDOWS.~BTSourcesPantherimgworks.png
C:$WinREAgentScratch
C:System Volume InformationEDP
C:System Volume InformationIndexerVolumeGuid
C:System Volume InformationWindows Backup
C:System Volume InformationWindowsImageBackup
C:System Volume InformationWPSettings.dat
C:System Volume InformationChkdskChkdsk20201221110016.log
C:System Volume InformationEDPRecovery
C:System Volume InformationWindows BackupCatalogs
C:System Volume InformationWindows BackupCatalogsGlobalCatalogLock.dat
C:System Volume InformationWindowsImageBackupSPPMetadataCache

C:WindowsSoftwareDistribution:

Folder PATH listing for volume Windows
Volume serial number is 641B-479B
C:WINDOWSSOFTWAREDISTRIBUTION
├───DataStore
│   └───Logs
├───Download
│   ├───40c9e31f3fa1731b9f71da79d884fbe6
│   ├───ae6a47efe9fd0e03da033575571e7c6d
│   │   └───cbshandler
│   ├───baa66f28726f701d6508d16b26235240
│   │   ├───Metadata
│   │   │   └───Windows10.0-KB4593175-x64-EXPRESS
│   │   └───Package_for_KB4593175~~amd64~~19041.680.1.0
│   │       ├───amd64_microsoft-windows-s..-installers-onecore_31bf3856ad364e35_10.0.19041.680_none_c984780e045b899c
│   │       ├───amd64_microsoft-windows-s..cingstack-onecoreds_31bf3856ad364e35_10.0.19041.680_none_9220853e80a07cef
│   │       ├───amd64_microsoft-windows-s..ck-mof-onecoreadmin_31bf3856ad364e35_10.0.19041.680_none_f789f0d48e0af1d8
│   │       ├───amd64_microsoft-windows-s..formers-shell-extra_31bf3856ad364e35_10.0.19041.680_none_c7d6d41fdc1eaa2b
│   │       ├───amd64_microsoft-windows-s..gstack-boot-onecore_31bf3856ad364e35_10.0.19041.680_none_338f2b4bcf702713
│   │       ├───amd64_microsoft-windows-s..ingstack-base-extra_31bf3856ad364e35_10.0.19041.680_none_fcccf2982248b1b5
│   │       ├───amd64_microsoft-windows-s..k-transformers-core_31bf3856ad364e35_10.0.19041.680_none_49fba22634662d4d
│   │       ├───amd64_microsoft-windows-s..llers-onecore-extra_31bf3856ad364e35_10.0.19041.680_none_01a2caa8222e0a15
│   │       ├───amd64_microsoft-windows-s..ngstack-onecorebase_31bf3856ad364e35_10.0.19041.680_none_ce4cfd4440d93c2d
│   │       ├───amd64_microsoft-windows-s..ransformers-onecore_31bf3856ad364e35_10.0.19041.680_none_021ebd345a75567f
│   │       ├───amd64_microsoft-windows-s..stack-inetsrv-extra_31bf3856ad364e35_10.0.19041.680_none_16f82254009eecc1
│   │       ├───amd64_microsoft-windows-s..stack-termsrv-extra_31bf3856ad364e35_10.0.19041.680_none_f098d9f99ea89093
│   │       ├───amd64_microsoft-windows-servicingstack-inetsrv_31bf3856ad364e35_10.0.19041.680_none_12f53731c5ece5e4
│   │       ├───amd64_microsoft-windows-servicingstack-onecore_31bf3856ad364e35_10.0.19041.680_none_1c18fdd47e42b752
│   │       ├───amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.680_none_e72768c3263f99bc
│   │       ├───x86_microsoft-windows-s..-installers-onecore_31bf3856ad364e35_10.0.19041.680_none_6d65dc8a4bfe1866
│   │       ├───x86_microsoft-windows-s..cingstack-onecoreds_31bf3856ad364e35_10.0.19041.680_none_3601e9bac8430bb9
│   │       ├───x86_microsoft-windows-s..ck-mof-onecoreadmin_31bf3856ad364e35_10.0.19041.680_none_9b6b5550d5ad80a2
│   │       ├───x86_microsoft-windows-s..formers-shell-extra_31bf3856ad364e35_10.0.19041.680_none_6bb8389c23c138f5
│   │       ├───x86_microsoft-windows-s..gstack-boot-onecore_31bf3856ad364e35_10.0.19041.680_none_d7708fc81712b5dd
│   │       ├───x86_microsoft-windows-s..ingstack-base-extra_31bf3856ad364e35_10.0.19041.680_none_a0ae571469eb407f
│   │       ├───x86_microsoft-windows-s..k-transformers-core_31bf3856ad364e35_10.0.19041.680_none_eddd06a27c08bc17
│   │       ├───x86_microsoft-windows-s..llers-onecore-extra_31bf3856ad364e35_10.0.19041.680_none_a5842f2469d098df
│   │       ├───x86_microsoft-windows-s..ngstack-onecorebase_31bf3856ad364e35_10.0.19041.680_none_722e61c0887bcaf7
│   │       ├───x86_microsoft-windows-s..ransformers-onecore_31bf3856ad364e35_10.0.19041.680_none_a60021b0a217e549
│   │       ├───x86_microsoft-windows-s..stack-termsrv-extra_31bf3856ad364e35_10.0.19041.680_none_947a3e75e64b1f5d
│   │       ├───x86_microsoft-windows-servicingstack-inetsrv_31bf3856ad364e35_10.0.19041.680_none_b6d69bae0d8f74ae
│   │       ├───x86_microsoft-windows-servicingstack-onecore_31bf3856ad364e35_10.0.19041.680_none_bffa6250c5e5461c
│   │       └───x86_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.680_none_8b08cd3f6de22886
│   └───SharedFileCache
├───PostRebootEventCache.V2
└───SLS
    ├───2B81F1BF-356C-4FA1-90F1-7581A62C6764
    ├───522D76A4-93E1-47F8-B8CE-07C937AD1A1E
    ├───7971F918-A847-4430-9279-4A52D1EFE18D
    ├───855E8A7C-ECB4-4CA3-B045-1DFA50104289
    ├───8B24B027-1DEE-BABB-9A95-3517DFB9C552
    ├───9482F4B4-E343-43B6-B170-9A65BC822C77
    └───E7A50285-D08D-499D-9FF8-180FDC2332BC

There were some errors in dism, the whole log is too long to be posted here, I managed to get dism logs generated tody, I uploded it to Google Drive:https://drive.google.com/file/d/1HbsPtZ79KVQqaYMGLVA4jA4fMSef2iLC/view

What to do?