Solved How do I delete failed updates from history etc


jimbo45

Well-known member
Pro User
VIP
Local time
1:51 PM
Posts
6,012
Location
Hafnarfjörður IS
OS
Windows XP,11 Linux Fedora Rawhide pre-release 46
Hi Windows Gurus
I've 2 failed updates (which were optional to start with). But if I do a windows update these failed updates block the process. How do I delete / get rid of them.

Cheers
jimbo
 

My Computer My Computer

At a glance

Windows XP,11 Linux Fedora Rawhide pre-releas...2 X Intel i7
OS
Windows XP,11 Linux Fedora Rawhide pre-release 46
Computer type
PC/Desktop
CPU
2 X Intel i7
Screen Resolution
4KUHD X 2
Far as i know you can't delete individual update logs you can delete all if you want.

You can use following batch script to delete windows update history.

Create a new text file, paste the code below into it, and save it as clear_update_history.bat.


Batch:
@echo off
:: Check for administrative privileges
net session >nul 2>&1
if %errorLevel% neq 0 (
    echo ========================================================
    echo ERROR: This script must be run as an Administrator!
    echo Please right-click the file and select "Run as administrator".
    echo ========================================================
    pause
    exit /b
)

echo ========================================================
echo   Clearing Windows Update History
echo ========================================================
echo.

:: 1. Stop Windows Update Services
echo [*] Stopping Windows Update services...
net stop wuauserv >nul 2>&1
net stop bits >nul 2>&1
net stop cryptsvc >nul 2>&1
echo [+][OK] Services stopped.
echo.

:: 2. Delete the Update History Log
echo [*] Deleting Windows Update history log...
if exist "%ALLUSERSPROFILE%\Microsoft\Network\Downloader" (
    del /q /f /s "%ALLUSERSPROFILE%\Microsoft\Network\Downloader\*" >nul 2>&1
)

:: The DataStore.edb file contains the actual history database
if exist "%WINDIR%\SoftwareDistribution\DataStore\DataStore.edb" (
    del /f /q "%WINDIR%\SoftwareDistribution\DataStore\DataStore.edb"
    echo [+][OK] Update history database deleted.
) else (
    echo [-] History database file not found or already deleted.
)
echo.

:: 3. Restart Windows Update Services
echo [*] Restarting Windows Update services...
net start cryptsvc >nul 2>&1
net start bits >nul 2>&1
net start wuauserv >nul 2>&1
echo [+][OK] Services restarted successfully.
echo.

echo ========================================================
echo   Process complete! Your update history has been cleared.
echo ========================================================
pause
 

My Computer My Computer

At a glance

Windows 11AMD Ryzen 7 5700GMicron Technology DDR4-3200 16GBNVIDIA GeForce RTX 3060
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
HP Pavilion
CPU
AMD Ryzen 7 5700G
Motherboard
Erica6
Memory
Micron Technology DDR4-3200 16GB
Graphics Card(s)
NVIDIA GeForce RTX 3060
Sound Card
Realtek ALC671
Monitor(s) Displays
Samsung SyncMaster U28E590
Screen Resolution
3840 x 2160
Hard Drives
SAMSUNG MZVLQ1T0HALB-000H1
Hi Jimbo45. I interpret this to mean that after two failed optional updates, Windows Update is no longer working. You've not stated how you are attempting the latest update (manually? Check for Updates?) - or in what way it's failing.

That they are listed as failed in Update History should not affect the use of Windows Update.

Assuming you are simply using Windows Update - manual Check for updates- then I suppose an obvious suggestion for reversion to a state before you applied the option updates would be to use an appropriate System Restore point - if you have one.


If on the other hand, you mean that Windows Update always attempts the optional updates and bombs out even when another update is pending, then if you wished to be selective, you could use a tool like WUMT (free) with checkbox selection.

Or choose not to receive optional updates. Or even hide them - WUMT supports that as well.
 
Last edited:

My Computer My Computer

At a glance

Windows 11 Proi7-8650U16GBIntel UHD 620
OS
Windows 11 Pro
Computer type
Laptop
Manufacturer/Model
Lenovo t480s
CPU
i7-8650U
Memory
16GB
Graphics Card(s)
Intel UHD 620
Screen Resolution
1920x1080
Hard Drives
C SN810 SDCPNRY-512G-1006
Browser
Edge, Firefox
Antivirus
Defender
Hi Jimbo45. I interpret this to mean that after two failed optional updates, Windows Update is no longer working. You've not stated how you are attempting the latest update (manually? Check for Updates?) - or in what way it's failing.

That they are listed as failed in Update History should not affect the use of Windows Update.

Assuming you are simply using Windows Update - manual Check for updates- then I suppose an obvious suggestion for reversion to a state before you applied the option updates would be to use an appropriate System Restore point - if you have one.


If on the other hand, you mean that Windows Update always attempts the optional updates and bombs out even when another update is pending, then if you wished to be selective, you could use a tool like WUMT (free) with checkbox selection.

Or choose not to receive optional updates. Or even hide them - WUMT supports that as well.
Thanks

That seems to have fixed it. Marked now as solved.

Cheers
jimbo
 

My Computer My Computer

At a glance

Windows XP,11 Linux Fedora Rawhide pre-releas...2 X Intel i7
OS
Windows XP,11 Linux Fedora Rawhide pre-release 46
Computer type
PC/Desktop
CPU
2 X Intel i7
Screen Resolution
4KUHD X 2
(y)
 

My Computer My Computer

At a glance

Windows 11 Proi7-8650U16GBIntel UHD 620
OS
Windows 11 Pro
Computer type
Laptop
Manufacturer/Model
Lenovo t480s
CPU
i7-8650U
Memory
16GB
Graphics Card(s)
Intel UHD 620
Screen Resolution
1920x1080
Hard Drives
C SN810 SDCPNRY-512G-1006
Browser
Edge, Firefox
Antivirus
Defender
Back
Top Bottom