Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Windows Disk Cleanup offers a Temporary Files handler which seems to delete some files from C:\Users\USERNAME\AppData\Local\Temp, but not all. People around the place have indicated that it won't delete anything newer than one week, and I notice there are no old .tmp files hanging around afterwards. So I guess it deletes only files ending in .tmp, and not in subdirectories, and only when a week old. But I would like authoritative information.

share|improve this question

1 Answer 1

Yes, by default it only cleans up files if they are older than 7 days old, but you can tweak that number to something else.

Taken from here:

Change Disk Cleanup to Delete Files Newer than 7 Days

If you’re one of those people that reboots your PC every day, you can probably change the Disk Cleanup value down to something lower, like 2 days. If you don’t reboot but you rarely keep applications open, you could probably do fine with 2-3 days instead, though the value you choose is really up to you—just keep in mind applications need those temporary files if they are running.

Open up regedit.exe through the Start Menu search or run box, and then browse down to the following key:

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

Once you’re there, you’ll see the LastAccess value on the right-hand side, which contains a value that specifies the number of days, which you can change to whatever you’d like. enter image description here

share|improve this answer
    
I have upvoted your answer, but I am hoping someone can tell me which files it will delete. –  Oliver Bock Feb 18 '13 at 22:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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