Make Disk Cleanup Tool delete ALL temporary files, including those created in the last 7 days

Many of us still prefer to use the built-in Disk Cleanup Tool. But if you use the tool to delete the junk and temporary files, you may find that some files may still be present in the temp folder. This is because, by default Windows does not delete the temporary (.tmp) files in the %WinDir%\Temp folder and in other folders which have been created or accessed in the last 7 days.

The files may be those related to something you may be downloading or currently working upon. They could even be related to some application which may be still open. Windows plays it safe and chooses not to delete temporary files which may be less than 7 days old.

But if you wish, you can set Disk Cleanup Tool to delete all the files in the temp folders.

To do so open Registry Editor and navigate to the following key:

HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Explorer\ VolumeCaches\ Temporary Files

Locate and double-click on LastAccess. When you see the Edit DWORD Value dialog box, change the Value Data setting from 7 to 0 and click OK. Setting it at 0 will make Disk Cleanup Tool delete all the files. If you set it at say 1, it will not clean the last 1 days temp files.

You may have to restart Windows to let the changes take effect.

Posted by on , in Category General with Tags
Anand Khanse is the Admin of, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

Leave a Reply

Your email address will not be published. Required fields are marked *

7 + 9 =