I have problem cleaning up the WinSxS folder with DISM on a Windows Server 2016 Standard (it's a physical server, not a VM).
The server have a C-drive that have a total of 149 GB of disk space, and only 20 GB is available.
The WinSxS folder usemore than 80 GB of disk space.
And PendingDeletes folder containing 5,501 files using 10.4 GB of disk, Renames folder containing 23,636 files using 534 MB of disk.
I need to clean this up. Any tips?
I done so far:
dism.exe /online /cleanup-image /AnalyzeComponentStore
Result:
Actual Size of Component Store: 82 GB
Shared with windows: 8.84 GB
Backups and Disabled Features: 56.07 GB
Cache and Temporary Data: 17.16 GB
After reboot I done several commands with several more reboots:
dism.exe /online /cleanup-image /startcomponentcleanup
dism.exe /online /cleanup-image /startcomponentcleanup /resetbase
dism.exe /online /cleanup-image /RestoreHealth /Source:C:\Windows\WinSxS /LimitAccess
I also mounted an Windows 2016 Server ISO and ran the same command again, just pointing to the mounted ISO
But nothing works regarding the DISM command, I keep getting the error of Pending Operations.
I also tried these without them giving any issues or solutions:
Dism.exe /Online /Cleanup-Image /ScanHealth
Dism.exe /Online /Cleanup-Image /CheckHealth
Scannow /sfc
A small part of the DISM log:
2024-09-24 12:45:54, Info DISM DISM.EXE: Succesfully registered commands for the provider: OfflineSetupManager.
2024-09-24 12:45:54, Info DISM DISM.EXE: Attempting to add the commands from provider: Edition Manager
2024-09-24 12:45:54, Info DISM DISM.EXE: Succesfully registered commands for the provider: Edition Manager.
2024-09-24 12:45:54, Info DISM DISM Provider Store: PID=9748 TID=6648 Getting Provider DISM Package Manager - CDISMProviderStore::GetProvider
2024-09-24 12:45:54, Info DISM DISM Provider Store: PID=9748 TID=6648 Provider has previously been initialized. Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
2024-09-24 12:45:54, Info DISM DISM Package Manager: PID=9748 TID=6648 Processing the top level command token(cleanup-image). - CPackageManagerCLIHandler::Private_ValidateCmdLine
2024-09-24 12:45:54, Info DISM DISM Package Manager: PID=9748 TID=6648 Attempting to route to appropriate command handler. - CPackageManagerCLIHandler::ExecuteCmdLine
2024-09-24 12:45:54, Info DISM DISM Package Manager: PID=9748 TID=6648 Routing the command... - CPackageManagerCLIHandler::ExecuteCmdLine
2024-09-24 12:45:54, Info DISM DISM Package Manager: PID=9748 TID=6648 Loaded servicing stack for online use only. - CDISMPackageManager::RefreshInstanceAndLock
2024-09-24 12:45:54, Info DISM DISM Package Manager: PID=9748 TID=6648 CBS session options=0x400100! - CDISMPackageManager::Internal_Finalize
2024-09-24 12:47:10, Info DISM DISM Package Manager: PID=9748 TID=10676 Error in operation: the operation could not be complete due to locked resources. (CBS HRESULT=0x800f0806) - CCbsConUIHandler::Error
2024-09-24 12:47:10, Error DISM DISM Package Manager: PID=9748 TID=6648 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f0806)
2024-09-24 12:47:10, Error DISM DISM Package Manager: PID=9748 TID=6648 The operation could not be completed due to pending operations. - GetCbsErrorMsg
2024-09-24 12:47:10, Error DISM DISM Package Manager: PID=9748 TID=6648 Failed processing package changes - CDISMPackageManager::StartComponentCleanupEx(hr:0x800f0806)
2024-09-24 12:47:10, Error DISM DISM Package Manager: PID=9748 TID=6648 The operation could not be completed due to pending operations. - GetCbsErrorMsg
2024-09-24 12:47:10, Error DISM DISM Package Manager: PID=9748 TID=6648 Failed to start component cleanup. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x800f0806)
2024-09-24 12:47:10, Error DISM DISM Package Manager: PID=9748 TID=6648 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f0806)
2024-09-24 12:47:10, Info DISM DISM Package Manager: PID=9748 TID=6648 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine
2024-09-24 12:47:10, Info DISM DISM Provider Store: PID=9748 TID=6648 Found the OSServices. Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
2024-09-24 12:47:10, Info DISM DISM Provider Store: PID=9748 TID=6648 Found the OSServices. Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
2024-09-24 12:47:10, Info DISM DISM Provider Store: PID=9748 TID=6648 Found the PE Provider. Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
2024-09-24 12:47:10, Info DISM DISM Provider Store: PID=9748 TID=6648 Finalizing the servicing provider(DISM Package Manager) - CDISMProviderStore::Internal_DisconnectProvider
2024-09-24 12:47:10, Info DISM DISM Package Manager: PID=9748 TID=6648 Finalizing CBS core. - CDISMPackageManager::Finalize
2024-09-24 12:47:10, Info DISM DISM Provider Store: PID=9748 TID=6648 Disconnecting Provider: DISM Package Manager - CDISMProviderStore::Internal_DisconnectProvider
2024-09-24 12:47:10, Info DISM DISM Provider Store: PID=9748 TID=6648 Finalizing the servicing provider(MsiManager) - CDISMProviderStore::Internal_DisconnectProvider