- Local time
- 2:17 AM
- Posts
- 192
- OS
- Windows 11
Hi,
I am testing and making a powershell script to delete empty folders in C:\Windows\WinSxS\Temp\InFlight\
To my understanding when updates or other windows operations occur, files in use might be placed there, and upon a restart they will be cleared.
On a lot of systems, i have thousands (some 10k, some over 100k) of empty folders in C:\Windows\WinSxS\Temp\InFlight\
While only 1 or a few folders actually has files inside it. The one folder with the most current date.
All the other folders are from dates when windows update did install updates, but after the reboot after the windows update the folder itself was not deleted.
I want do this, because during backup/sync/virus/malware scan operations on different systems i see a few min delay in processing all those empty folders. So i tought i am going to test this on a few systems, if it gives any problems to delete those empty folders.
I will be doing these operations on some virtual machines i use daily, with an snapshot to revert back to. Will be testing this for about one month, before pushing this to live machines.
Most search records i find online is, do not touch the WinSxS folder...
Anyone who has experience with this, or has been testing around with this? Any toughts about doing this?
![1739536895909.webp 1739536895909.webp](https://www.elevenforum.com/data/attachments/125/125350-dbfac9adf7c074314314c644fa6eafad.jpg?hash=A6PIJfIv7o)
I am testing and making a powershell script to delete empty folders in C:\Windows\WinSxS\Temp\InFlight\
To my understanding when updates or other windows operations occur, files in use might be placed there, and upon a restart they will be cleared.
On a lot of systems, i have thousands (some 10k, some over 100k) of empty folders in C:\Windows\WinSxS\Temp\InFlight\
While only 1 or a few folders actually has files inside it. The one folder with the most current date.
All the other folders are from dates when windows update did install updates, but after the reboot after the windows update the folder itself was not deleted.
I want do this, because during backup/sync/virus/malware scan operations on different systems i see a few min delay in processing all those empty folders. So i tought i am going to test this on a few systems, if it gives any problems to delete those empty folders.
I will be doing these operations on some virtual machines i use daily, with an snapshot to revert back to. Will be testing this for about one month, before pushing this to live machines.
Most search records i find online is, do not touch the WinSxS folder...
Anyone who has experience with this, or has been testing around with this? Any toughts about doing this?
![1739536895909.webp 1739536895909.webp](https://www.elevenforum.com/data/attachments/125/125350-dbfac9adf7c074314314c644fa6eafad.jpg?hash=A6PIJfIv7o)
Last edited:
My Computer
System One
-
- OS
- Windows 11
- Computer type
- PC/Desktop