This question already has an answer here:

When does Windows clear this directory? The only time it seems to is when running disk cleanup tool one is given the option..

marked as duplicate by nc4pk, fixer1234, DavidPostill windows Jan 20 '17 at 14:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Windows never automatically cleans the %TEMP% directory by default. In Windows 10 you have to enable this feature in Settings, and with earlier versions you must delete the files yourself or use programs like Disk Cleanup or cCleaner.

Developers using temporary files are expected to clean up after themselves.

  • 25
    "Developers using temporary files are expected to clean up after themselves."...and the crowd breaks out laughing (not at you, but that is like inexpensive lawyers and the tooth fairy...figments of your imagination). – KCotreau Jun 14 '11 at 13:50
  • I didn't enable anything and I know mine disappear. I will see if I can observe the schedule. – Palu Macil Feb 14 at 5:44
  • A lot of the code examples I've seen that use temporary files don't clean up after themselves. Good thing normal users don't care about disk space, amiright... – Alexander Apr 27 at 22:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.