Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Coldblackice/2018fd55a54cc0fc39c6bdad6bc99463 to your computer and use it in GitHub Desktop.
Save Coldblackice/2018fd55a54cc0fc39c6bdad6bc99463 to your computer and use it in GitHub Desktop.
๐Ÿ—‘๏ธ Windows 10 - reduce WinSxS folder and delete temporary files
REM you need to execute in adminstrator command prompt
REM based on
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder
Dism.exe /online /Cleanup-Image /StartComponentCleanup
REM All existing service packs and updates cannot be uninstalled after this command is completed.
REM This will not block the uninstallation of future service packs or updates
Dism.exe /online /Cleanup-Image /SPSuperseded
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
%systemroot%\system32\cleanmgr.exe /dC
cleanmgr /sageset:65535 /sagerun:65535
%systemroot%\system32\cmd.exe /c Cleanmgr /sagerun:65535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment