Score:1

Windows Update Cleanup - Disk Cleanup via script/command prompt

pg flag

We've noticed that when running Disk Cleanup utility manually on a windows server 2019 that 'Windows Update Cleanup' takes up a substantial amount of space. Is there away to clean this up via a command prompt/powershell

I've looked at a number of scripts which do not clear this down. Could anyone advise what is the best way to achieve this? enter image description here

Score:0
cn flag

The official Microsoft way:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup" /V "StateFlags0000" /T REG_DWORD /D "2" /F

cleanmgr.exe /SAGERUN:0

Logfiles are located here:

C:\Windows\System32\LogFiles\setupcln\setupact.log
C:\Windows\System32\LogFiles\setupcln\setuperr.log

C:\Windows\Logs\DISM\dism.log
C:\Windows\Logs\CBS\CBS.log

DISM may also be an option.

https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder?view=windows-11

dism.exe /online /cleanup-image /startcomponentcleanup /resetbase
Boomerang avatar
pg flag
Sorry about the delay in getting back, the following looks to work dism.exe /online /cleanup-image /startcomponentcleanup /resetbase but does seem quite excessive. cleanmgr.exe /SAGERUN:0 prompted for user input.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.