question

NarveAndreasNords-9676 avatar image
0 Votes"
NarveAndreasNords-9676 asked TeemoTang-MSFT commented

Unable to cleanup WINSXS/temp/PendingDeletes

Hi,

On a Server 2012 R2 the WINSXS/temp/PendingDeletes folder contains 52 GB. All are labelled $$DeleteMe...." and are from between 2013 and 2016.

And running the command dism /CleanUp-Image /AnalyzeComponentStore report 25 GB and a cleanup is recommended.

![66573-dism.jpg][1]

But running dism /CleanUp-Image /StartComponentCleanup only last for 3 seconds and nothing happends.

Running DiskCleanup does only remove some 100 MB.

A reboot does not help

How to get rid of all the files in WINSXS/temp/PendingDeletes?


windows-server-2012
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TeemoTang-MSFT avatar image
0 Votes"
TeemoTang-MSFT answered

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.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NarveAndreasNords-9676 avatar image
0 Votes"
NarveAndreasNords-9676 answered

Thank you for the feedback.
I did run the needed commands:
66899-dism-commands.jpg


But still the PendingDeletes are huge. No files are deleted:
66955-folder-size.jpg



What to do?


dism-commands.jpg (46.3 KiB)
folder-size.jpg (48.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

abbodi86-0005 avatar image
0 Votes"
abbodi86-0005 answered

Google for NSudo

 NSudo -U:T -P:E cmd /k "del /f /q C:\Windows\WinSxS\Temp\PendingDeletes\*"
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NarveAndreasNords-9676 avatar image
0 Votes"
NarveAndreasNords-9676 answered TeemoTang-MSFT commented

Hi @abbodi86-0005 and thank for your suggestion.

I get Access denied when I run the command. Both as TrustedInstaller and System:
67366-nsudo.jpg

'a rather stubborn folder.
Any other suggestions?



nsudo.jpg (75.4 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Try from safe mode
the files are probably in use for some reason

0 Votes 0 ·

Would you mind letting me know the update of the problem? If you need further assistance, feel free to let me know.

0 Votes 0 ·