What are "temp" folders used for in Windows 10?
You can delete the files in local appdata .. \temp with no harm. If any file is busy by an app, it will not allow deletion. Do not force it.
You can also delete files in c:\windows\temp with the same notes as above. Do not force deletion of any file in appdata temp or windows temp.
Once deleted, do not forget to empty the recycle bin.
You can also run Admin Tools, Disk Cleanup and use the Cleanup System files option.
As the name suggests, %localappdata%\Temp
is a folder where any app can store temporary files.
Normally, apps should clean up after themselves by removing any temporary files they create. However, they may fail to do so, perhaps if they encounter unexpected setup errors, or if your computer crashes for some unrelated reason while they are running.
The only thing to be careful of is that an app may create temporary files and expect to find them after a reboot, so as to complete a setup or uninstall you ran. In this scenario, if you had cleaned up by deleting temporary files, the app would then not be able to complete the setup/install as you would have removed files that were not yet finished with.
So yes, as long as you perform a clean boot first, you can delete any or all contents of %localappdata%\Temp
(although you should keep the folder itself as it's a Windows folder).