none
When to the files in C:\Windows\winsxs\Temp\PendingRenames get processed

    Question

  • Hello

    This is in Windows 7 Professional

    Yesterday I noticed sfc had been running and I ran sfc /SCANNow from the command prompt

    It said it had fixed some problems. I later realized the C:\Windows\winsxs\Temp\PendingRenames and PendingDeletes have a lot of files in them. 5484 files are in Pending renames with a size of 105 MB

    I started the computer in safe mode and ran sfc again. Again it said it had fixed some problems. This put more files in PendingRenames..

    When do these pending changes get made?

    I don't think I can just delete these files.

    Thanks in advance

    -Dick



    Tuesday, October 14, 2014 3:11 PM

Answers

  • Hi,

    Yes you are right. "'Deleting files from the WinSxS folder or deleting the entire WinSxS folder may severely damage your system so that your PC might not boot and make it impossible to update."

    The files are generated by the SFC, SFC command would log its action into CBS.log, we could take a look at the CBS.log for what the SFC did. Reference: How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program generates in Windows Vista

    For the files created in the mentioned folder, which is generated by SFC command and SFC didn't do a good job to clean its job. These should be cleaned up by the TrustedInstaller scavenge process, however in CBS.log we will find:  Store coherency cookie matches last scavenge cookie, skipping scavenge. Which means SFC won't clean up for what it did.

    To remove those files, we need to start the TrustedInstaller by enabling something small, that isn't installed by default (like telnet):

    dism /online /enable-feature /featurename:TelnetClient

    After the installation, TrustedInstaller will continue running waiting for 5-10 minutes to pass and for the machine to be "idle" and then start the scavenge routine. If "TrustedInstaller.exe" isn't running, it can be started with:     net start TrustedInstaller.
    After scavenge, the entries under PendingRenames and PendingDeletes should be cleared.

    Another thing is the PendingRenames folder is also be used by Windows update, which we could take use of Disk clean up to clear it.

    Hope this maybe helpful.

    Best regards


    Michael Shao
    TechNet Community Support

    • Marked as answer by Dick Christoph Wednesday, October 15, 2014 4:09 PM
    Wednesday, October 15, 2014 9:40 AM
    Moderator

All replies

  • Hi,

    Yes you are right. "'Deleting files from the WinSxS folder or deleting the entire WinSxS folder may severely damage your system so that your PC might not boot and make it impossible to update."

    The files are generated by the SFC, SFC command would log its action into CBS.log, we could take a look at the CBS.log for what the SFC did. Reference: How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program generates in Windows Vista

    For the files created in the mentioned folder, which is generated by SFC command and SFC didn't do a good job to clean its job. These should be cleaned up by the TrustedInstaller scavenge process, however in CBS.log we will find:  Store coherency cookie matches last scavenge cookie, skipping scavenge. Which means SFC won't clean up for what it did.

    To remove those files, we need to start the TrustedInstaller by enabling something small, that isn't installed by default (like telnet):

    dism /online /enable-feature /featurename:TelnetClient

    After the installation, TrustedInstaller will continue running waiting for 5-10 minutes to pass and for the machine to be "idle" and then start the scavenge routine. If "TrustedInstaller.exe" isn't running, it can be started with:     net start TrustedInstaller.
    After scavenge, the entries under PendingRenames and PendingDeletes should be cleared.

    Another thing is the PendingRenames folder is also be used by Windows update, which we could take use of Disk clean up to clear it.

    Hope this maybe helpful.

    Best regards


    Michael Shao
    TechNet Community Support

    • Marked as answer by Dick Christoph Wednesday, October 15, 2014 4:09 PM
    Wednesday, October 15, 2014 9:40 AM
    Moderator
  • Hi Michael

    Thanks that worked.

    I didn't install telnet I just rebooted and ran "net start TrustedInstall" in a command prompt with run as administrator

    It cleared all but 5 of the deletes.

    -Dick

    Wednesday, October 15, 2014 4:11 PM
  • I used "Unlocker" for delete all folders.

     net start TrustedInstaller not work for me.

    Friday, March 30, 2018 11:44 AM