The Computer Oracle

Where are "temporary files" cleaned by Windows 7 Disk Cleanup?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzling Curiosities

--

Chapters
00:00 Where Are &Quot;Temporary Files&Quot; Cleaned By Windows 7 Disk Cleanup?
00:34 Accepted Answer Score 8
01:13 Answer 2 Score 2
01:55 Thank you

--

Full question
https://superuser.com/questions/513381/w...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows7 #temporaryfiles #diskcleanup

#avk47



ACCEPTED ANSWER

Score 8


The "Temporary Files" folder that Disk Cleanup is referring to is the one pointed to by the environment variable %TEMP%. You can go directly to this folder by typing %TEMP% in the Run box or in the address bar in Windows Explorer.

Disk Cleanup's list of "places to cleanup" is stored in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches. The Temporary Files item is in a key named, unsurprisingly, Temporary Files.




ANSWER 2

Score 2


I couldn't find anything other than %TEMP% in the registry key mentioned by Patrick, so I tried to log cleanmgr.exe using Process Monitor.

cleanmgr.exe does a File System Class SetDispositionInformationFile Operation with Delete: True Detail on files in %TEMP%, which in my case according to echo is equal to %LOCALAPPDATA%\Temp

It had already deleted the 3 GB unaccounted for by %TEMP% though, and didn't trim the 500+ MB C:\Windows\Logs\CBS\CBS.log; I suspect most of my wasted space was in winsxs.