Temporary files Windows 11

Trond Gunnar Raa 125 Reputation points
2024-10-29T21:29:53.35+00:00

I've previously reported issues with deleting temporary files in Windows 11. Despite many suggested solutions from agents Daisy Zhou and MotoX80, I haven't found a resolution.

Temporary files consistently show 1.20 GB under Settings > System > Storage > Temporary files. I uncheck all options and select delete. I also run storage sense which only deletes 1 MB (this is consistent, it never deletes more). Additionally, I use the disk cleanup command, but the options are gone since the files are already deleted as mentioned above. Temporary files are now reduced to 1.05 GB. I further try manual deletion: Win+R (run), enter %temp% and temp (this is essentially the same command as Users<YourUsername>\AppData\Local\Temp) and delete all files in these folders. The next step is to clear the Windows Update cache – C:\Windows\SoftwareDistribution – all files are deleted.

The Microsoft Store cache is cleared with "wsreset.exe" (command win+R). I also delete old restore points (which usually take up 2GB) and create a new one.

Still, temporary files show 1.05 GB.

I also try recommended solutions using commands in CMD:

net stop wuauserv & net stop bits & net stop cryptsvc

rd /s /q c:\Windows\SoftwareDistribution

net start wuauserv & net start bits & net start cryptsvc

sc config wuauserv start=auto

sc config bits start=auto

sc config cryptsvc start=auto

Still, no solution has occurred, temporary files show 1.05 GB.

The PC is also started in safe mode as recommended, but even here it is not possible to see more temporary files. Furthermore, the programs CCleaner, Treesize Free, and Windirstat are run with the same result.

Hibernation, which can also create large system files, is also disabled (powercfg -h off).

The system is scanned with Windows Defender and the program Malwarebytes.

The outcome of all these operations is that no more temporary files are deleted, but still show 1.05 GB. The problem started a few minutes before the 24H2 update was available on 18/10. Before this day, temporary files showed about 150 MB.

I suspect it might be a reporting problem in Windows.

I look forward to hearing from you!"

Windows for business Windows Client for IT Pros User experience Other
{count} votes

1 answer

Sort by: Most helpful
  1. Yanhong Liu 14,195 Reputation points Microsoft External Staff
    2024-10-30T05:40:37.4566667+00:00

    Hello

    Thank you for posting in Q&A forum.

    It sounds like you've covered a lot of ground already. Here are a few additional steps you can try:

    1. Check for Locked Files:

    Sometimes, temporary files can be locked by running processes. Open Task Manager (Ctrl + Shift + Esc), go to the Processes tab, and look for any processes that might be using the temporary files. End those processes and try deleting the files again.

    1. Use PowerShell:

    You can use PowerShell to force delete temporary files. Open PowerShell as an administrator and run the following command:

    Remove-Item -Path "$env:TEMP*" -Force -Recurse

    This command will forcefully delete all files in the temp folder.

    1. Registry Edit:

    Sometimes, registry entries can cause issues with temporary files. Open the Registry Editor (Win + R, type regedit), navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, and delete the profiles that are no longer needed.

    1. System File Checker:

    Run the System File Checker tool to repair any corrupted system files:

    sfc /scannow

    1. Check Disk Health:

    Run a disk check to ensure there are no underlying disk issues: (CMD command)

    chkdsk

    Best regards

    Yanhong

    =====================================

    If the answer is helpful, please click "Accept answer" and upvote it

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.