The command you mentioned is correct
DISM /online /Cleanup-Image /StartComponentCleanup
However, for that task to complete, TrustedInstaller must be running, which is not set up by default. To run TrustedInstaller, you may need to first enable TelnetServer, then enter
net start TrustedInstaller
source:
cleanup C:\Windows\WinSxS\Temp\PendingDeletes and PendingRenames
https://superuser.com/questions/1024441/cleanup-c-windows-winsxs-temp-pendingdeletes-and-pendingrenames
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
-------------------------------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.