Unable to cleanup WINSXS/temp/PendingDeletes

Narve Andreas Nordås 26 Reputation points
2021-02-10T14:34:14.95+00:00

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
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,535 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Teemo Tang 11,351 Reputation points
    2021-02-11T02:04:03.317+00:00

    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.

    0 comments No comments

  2. Narve Andreas Nordås 26 Reputation points
    2021-02-11T11:44:12.897+00:00

    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?

    0 comments No comments

  3. abbodi86 3,856 Reputation points
    2021-02-11T19:48:24.937+00:00

    Google for NSudo

    NSudo -U:T -P:E cmd /k "del /f /q C:\Windows\WinSxS\Temp\PendingDeletes\*"
    
    0 comments No comments

  4. Narve Andreas Nordås 26 Reputation points
    2021-02-12T10:02:50.14+00:00

    Hi @abbodi86 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?