Emptying Windows temp folder is a good idea?
Am using DELL Inspiron
with Windows 7
.
As far as I know emptying the windows temp folder would be good. But I faced a strange behaviour around 8 months back, when I clear my windows temp folder. The next day onwards, my laptop starting displaying daily one or other errors and one day OS got crashed. Till now I am not sure whether OS got crashed due to clearing the windows temp folder or something else is problem.
Here Windows temp folder mean "C:\Windows\Temp"
This is the behind the story.
Today, this temp folder "C:\Windows\Temp"
contains 102 GB.
Most of the space occupied by the files starts with etilqs_*.*
. I came to know that these files are generated due to WD SmartWare
.
Now my problem is:-
Actually I want clean up this folder, since it occupies lot of space.
If I clean up "C:\Windows\Temp"
folder, will my laptop face the same kind of problem which I faced earlier OR Any new problems will occur?
Please suggest me a good solution.
As the name implies, the location is intended for files that are only supposed to be stored temporarily.
So, if you write an application and you want to store something for later retrieval, this is the wrong place for you. The Temp location is only to be used for data that, if gone, wouldn't matter anyway.
Sadly, not every programmer understands that concept.
If someone decided to place a critical file in that location, deleting that file might cause a problem to an application.
So, in my personal opinion, deleting the contents of the Temp folder shouldn't cause any problems. But due to the fact of how it is used, it can not be guaranteed to be a safe operation.
Please also keep in mind, emptying the folder while the system in operational could cause a running application to lose a file it placed there. Emptying the folder is something best done during boot.
Emptying temp folders seems to be obvious. With most Linux distributions this is done on each boot.
But not with Windows. Why ?
Because some softwares use temp as a reliable storage accross reboot. Yes this is stupid.
Most of those softwares are doing that only after install if they need a reboot. Once done, the files can be wiped out.
Such software are now very rare. I didn't saw any since maybe 2 or 3 years.
So: use a scheduled task run on boot, which delete the content of temp folders, but only for files older than, say, 7 days.
This will do the job safely.
How to delete old files:
https://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days
As stated by many, it should not be a problem, but honestly just in this week i was trying to 'clean' my pc by Uninstalling programs. to my dismay i couldnt uninstall a bunch because the uninstall depended on files stored in the temp folder(since the installer extracted the setup files there), which i clear regularly.
i have found programs like skype and vmware persistently holding on to files in temp folders, but i dont think they depend on them to function correctly.
once on a server, after clearing the temp folder for 'Administrator' various functions in Sql Server management studio failed because of something that couldnt be found in the temp folder.
just my experience on the bad usage of temp files.
Deleting of temp files won't create a problem, but instead of deleting the files from the Temp directory, you can use the diskcleanup tool which was provided by Microsoft.
Generally you can't rely on software to be treating the storage as temporary.
For the WD software, see http://community.wd.com/t5/WD-Software/WDsmartware-building-etilqs-files-in-my-windows-temp-folder/td-p/307856
I found that much of the contents of my /Windows/TEMP were .log files and .txt files from Windows and .NET upgrades. I figured I could safely delete them (did a search, recovered over a 1Gb of disk space).
You could also do a search for all files (not directories) last accessed over, say, a week ago and set them to be compressed.