If the files are in use your delete of them will fail. The temp folder is not always deleted, even after proper shutdowns, and the space can pile up to large proportions. Windows server 2019 the problem:
Cuddie Funeral Homes Loyal, Greenwood, Thorp Wisconsin Obituaries
I wanted to do disk cleanup myself and found a large folder in %localappdata% called temp. I always recommend deleting as many files as possible in this folder, as they are only. If they are not in use, then delete them.
You don't need to delete the folder itself though, only its content.
Since windows 11 (or maybe earlier) windows notepad internally stores unsaved files so if the application (or windows) crashes they will be still there later. The temp folder is for temporary things. It was good to be in the habit of periodically deleting the temp files created in c:\\tmp by windows and other software, or else you'd risk filling up your fancy. I've been deleting the temp folder contents since the days of windows 95.
I wondered if deleting the contents of it won't harm my computer. Make sure you are indeed in the temp folder, then hit yes. It will try to delete. One of our servers has a lot of accumulated files under c:\windows\temp folder.
The question is quite straight forward, i need a list of environment variables (which is a fixed list) and is answered by dennis williamson.
The %temp% in the run command line will show the contents of the logged in user's temp folder.