Tuesday, February 2, 2010

Clearing PendingRenames in Windows 7 WinSXS

Running sfc /scannow on Windows7 has the unfortunate side effect of creating a number of entries in the PendingRenames directory.  These should be cleaned up by the TrustedInstaller scavenge process, but they aren't..

The answer is in Windows\Logs\CBS\cbs.log
  Store coherency cookie matches last scavenge cookie, skipping scavenge.

Eg, SFC creates entries but doesn't set the state necessary to clean up after itself. Sloppy.
To remove them, you need to "install" something small, that isn't installed by default:

  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, all the entries under PendingRenames and PendingDeletes should be empty.



  1. This is a very neat way of initiating the scavenge process. I thank you.

  2. This worked perfectly. Thank you!

  3. Nice, I was looking around for this for quite some time now,

    Thanks for sharing the knowledge