What you're describing sounds like Windows or some background process is continuously generating temporary files faster than they’re being cleared. Even though you cleared %appdata%\Local\Temp manually and ran Disk Cleanup, there are several places and mechanisms in Windows that can cause disk space to fill unexpectedly.
First, Windows Update itself can produce large temporary files. Even if you ran Disk Cleanup, some update files can remain cached in C:\Windows\SoftwareDistribution\Download and C:\Windows\WinSxS. You can try manually checking the SoftwareDistribution folder and using the command
net stop wuauserv
to stop the update service, delete or move files in C:\Windows\SoftwareDistribution\Download, then restart the service with
net start wuauserv
Another culprit is Windows’ pagefile and hibernation file. The pagefile (pagefile.sys) can be several GB depending on system memory, and hiberfil.sys will roughly equal RAM size if hibernation is enabled. While these aren’t “temp files” per se, they consume disk space invisibly. You can check the sizes with
dir /a C:\
in an elevated command prompt.
Windows also keeps Shadow Copies and System Restore points. These can accumulate if disk space is limited. To check their usage, run
vssadmin list shadowstorage
and to remove older restore points (keeping only the most recent), run
vssadmin delete shadows /for=C: /oldest
Some applications also create temp files in unusual locations. Browsers, development tools, and antivirus software sometimes generate large caches in %localappdata% outside of the usual Temp folder. You can use a disk analysis tool like WinDirStat or TreeSize Free to see what folders are actually consuming space; this often reveals hidden folders like C:\Users\<username>\AppData\Local\Microsoft\Windows\INetCache or log files in C:\Windows\Logs that grow over time.
Finally, the temp folder itself can grow because some processes create files with permissions that prevent normal cleanup, or because files are in use and cannot be deleted. You could try booting into Safe Mode and clearing %localappdata%\Temp there to ensure nothing is locking files.
If you want to track what process is generating the temporary files in real time, you can use Sysinternals’ Process Monitor. Set a filter on Path contains Temp and Operation is CreateFile to see which process is writing large amounts of temporary data. That usually points directly to the culprit.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin