Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / PowerShell / Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025 PowerShellQuestions and AnswersWindows 10Windows 11

Uninstalling Windows Updates via CMD/PowerShell

If you’re experiencing problems or errors on a computer after installing Windows updates, you might want to uninstall a specific update or all recently installed updates to help resolve the problem. Let’s look at how to remove installed updates in Windows from the command line or PowerShell.

Contents:
  • How to Uninstall a Specific Windows Update from the Command Prompt
  • Uninstall Recent Windows Updates Using PowerShell
  • Remove Update from a Windows Image with DISM (Remove-WindowsPackage)

How to Uninstall a Specific Windows Update from the Command Prompt

To list the installed updates from the command line, use the wmic command:

wmic qfe list brief /format:table

wmic qfe list brief - list installed updates

The command output includes update numbers (KB, HotFixID) and installation dates. To uninstall a specific update, copy its KB ID and run the command:

wusa /uninstall /kb:5048667

Confirm the update removal.

wusa /uninstall

When an update is successfully removed, an event from WUSA with Event ID 7 will appear in the Setup log in Event Viewer:

Windows update "Security Update for Microsoft Windows (KB5048667)" was successfully uninstalled. (Command line: ""C:\Windows\system32\wusa.exe" /uninstall /kb:5048667")

WUSA with Event ID 7 - Update was successfully uninstalled

To prevent Windows from trying to reinstall an update that has been removed, you can pause updates for up to 35 days.

In previous versions of Windows, the wusa command could be used to silently uninstall updates in the background, without prompting, and with a delayed reboot. The following command has been used:

wusa.exe /uninstall /KB:5048161 /norestart /quiet

However, the background update uninstall mode has been disabled since Windows 10 1507. The /quiet parameter is now ignored by the wusa.exe command. In this case, an error with event ID 8 will appear in the Event Viewer log:

Windows update could not be uninstalled because of error 2147942487 "The parameter is incorrect." (Command line: ""C:\Windows\system32\wusa.exe" /uninstall /KB:5048161 /norestart /quiet")

wusa.exe unable to uninstall updates with /quiet

Uninstall Recent Windows Updates Using PowerShell

You can use PowerShell for more flexibility when uninstalling updates. The following PowerShell command lists the installed Windows updates in order from the most recent to the oldest.

Get-CimInstance -ClassName Win32_QuickFixEngineering| select HotFixID, InstalledOn | sort InstalledOn -Descending

Or:

Get-HotFix | Select-Object HotFixID, InstalledOn, Description| sort InstalledOn -Desc

Get-HotFix

To remove all Windows updates that were installed on a specific date, use the following commands

$Update_Date="04/10/2025"
Get-CimInstance -ClassName Win32_QuickFixEngineering | ? InstalledOn -Match $Update_Date | %{start "wusa.exe" @("/uninstall", "/kb:$($_.HotFixID.Substring(2))") -Wait}

PoweShell: uninstall latest updates

The PSWindowsUpdate PowerShell module can also be used to remove installed updates.  Install the module on your computer:

Install-Module -Name PSWindowsUpdate

List the 10 most recently installed updates:

Get-WUHistory | Select-Object -First 10| select KB,OperationName,Date,Result,title|ft

Get-WUHistory - list latest installed updates

To uninstall an update, enter the update KB number in the command (in this example, quiet mode is used with the confirmation prompt suppressed):

Remove-WindowsUpdate -KBArticleID KB5048667 -Confirm:$false -Verbose

Remove-WindowsUpdate cmdlet

If the Remove-WindowsUpdate command returns the code -2145124318, it means that such an update cannot be removed.

HResult -2145124318 when Remove WindowsUpdate

To prevent this update from being installed automatically, you must hide it in Windows Update:

Hide-WindowsUpdate -KBArticleID KB5048667

If you want to uninstall an update on a remote computer, you can use:

  • PSExec.exe tool:
    psexec \\192.168.132.15 -u locadm -s cmd.exe /c "dism /online /remove-package /packagename:Package_for_DotNetRollup_481~31bf3856ad364e35~amd64~~10.0.9290.1 /quiet /norestart"
  • or PowerShell Remoting:
    Invoke-Command -ComputerName 192.168.132.15 -ScriptBlock { Remove-WindowsUpdate -UpdateID KB5048161 -Force -Confirm:$false }

Remove Update from a Windows Image with DISM (Remove-WindowsPackage)

An error may occur when removing some updates:

Windows Update Standalone Installer
Servicing Stack 10.0.26100.2592 is required by your computer and cannot be uninstalled.

Servicing Stack is required by your computer and cannot be uninstalled.

The point is that this is a Servicing Stack Update (SSU). Microsoft states that Servicing Stack Updates (SSUs) cannot be uninstalled once installed, because they are essential system components that are required for the successful installation of the Latest Cumulative Updates (LCU).

However, there is a workaround to uninstall the Latest Cumulative Update (LCU) even after the Servicing Stack Update (SSU) has been installed.

This method carries potential risks and can make the Windows operating system unstable or inoperable. Proceed with caution.

List the installed updates in the Windows image:

Get-WindowsPackage -Online | where ReleaseType -like "*Update*"|ft

To remove an update package from an image, copy its name and run the command:

Remove-WindowsPackage -Online -NoRestart -PackageName Package_for_RollupFix~31bf3856ad364e35~amd64~~26100.2314.1.10

Remove update from Windows image using Remove-WindowsPackage

We also recommend reading the article on how to uninstall programs using PowerShell.
0 comment
1
Facebook Twitter Google + Pinterest
previous post
Allowing Ping (ICMP Echo) Responses in Windows Firewall
next post
Remove ‘Your License isn’t Genuine’ Banner in MS Office

Related Reading

Configure NTP Time Source for Active Directory Domain

May 6, 2025

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Remove ‘Your License isn’t Genuine’ Banner in MS...

April 21, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Assign (Passthrough) a Physical GPU to a Hyper-V Virtual Machine
  • Run PowerShell Scripts on a Schedule with Task Scheduler
  • Extend an Expired User Password in Active Directory
  • Check Windows 11 Hardware Readiness with PowerShell Script
  • How to Enable and Configure Wake-on-LAN (WoL) in Windows
  • How to Find Windows Version and Build Number Installed
  • Check the Software Installation/Removal History in Windows
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top