windows - What files are in local settings/temp and can I delete them?

24
2014-04
  • leora

    I just found that I have 4 GB of space in /Documents and Settings/<user name>/Local Settings/temp.

    Is there any reason why I shouldn't go and delete these?

  • Answers
  • Ganesh R.

    The location you mentioned is the default location for System Environment Variable "TEMP" or "TMP". Applications use the TEMP for storing temporary data, data that will be needed for the specific user session & installers use it to extract the data from the compressed installation files. You can safely delete any files that are not locked. (Locked files are still being used by application for storing user data). The easiest way will be using CCleaner a freeware to do it for you.

  • Peter Mortensen
    Can I delete this? What are the implications?
    

    You can go ahead with cleaning up of this. There would be few files which are in use by Windows, and you'd error out while trying to delete them.

    I'd recommend using a tool like CC Cleaner to clear up.

    C:\Documents and Settings\[MyName]\Local Settings\Application Data holds data regarding configuration files, settings, and other data which may/may not be required. I recommend you don't touch this directory.

  • Nifle

    Everything in the tempfolder should be ok to delete, some files are probably locked but you can ignore them.

    Do NOT touch the "application data" folder. This is where all "good behaving apps" store their data (settings and such)

  • Bender

    You may find yourself unable to uninstall some applications that put their .msi packages there. Other than that it's all right to clean up. Better do it right after reboot so that less files there will be in use.

  • harrymc

    Don't worry about locked files. Just delete all the files you can, and ignore the ones you can't.

    I usually create the directory C:\Temp and set it in the environment variables "TEMP" and "TMP" for both the system and the user. That way, it's much easier to survey the accumulated junk. Sometimes I find files in there that I prefer to keep, which is another reason that I don't use CCleaner, etc. to automatically do it for me.

  • Jawa

    Create another folder with a different name and move the files into the new folder.

    • If a program crashes, restore the files via copy and paste or drag-n-drop in Windows Explorer, etc.
    • If a file or files are needed to finish an installation or some other function some programs may be corrupted if they're not present or get deleted.
    • If nothing changes after you have them moved for a while and you're using all your regular programs, delete them as you deem necessary.

    I needed this information in the past and ended up deleting most of the files and keeping a couple folders after much research. This is not the same as the Temporary Internet Files. You can delete those any time.


  • Related Question

    temporary - Why are there so many files in my Windows local temp folder?
  • RED SOFT ADAIR-StefanWoe

    In my folder

    C:\Documents and Settings\<username>\Local Settings\Temp
    

    I accidentally find 7174 files using 2.9 GB.

    Investigations show that many files are from uninstalled software (for example, DevPartner Studio).

    Questions:

    • Is this 'normal'? Should it be that way?

    • Can I safely delete all theses files?

    This machine is one year old. I installed some software on it, but I use VMs for test installations.


  • Related Answers
  • quickly_now

    The temp folder is for temporary things. If the files are in use your delete of them will fail. If they are not in use, then delete them.

    I've been deleting the temp folder contents since the days of Windows 95 with no ill-effects, in fact back then I used to be a domain admin and I had it set up so that the domain logon script would erase the temp folder every day when a user logged in.

    The reason for the accumulation of junk is that there are many, many badly written / badly behaved programs that don't do a good enough job of cleaning up their crap.

    Delete away. Remember to use SHIFT-DELETE key when deleting so they are really deleted instead of going to the recycle bin.

    (It used to be the case the MS Word in particular was a bit sensitive to the number of temp files kicking around and would run slower and with less stability. That's probably no longer the case with more modern versions, but was one of the reasons I used to religiously clean out the temp folder.)

  • Bart Silverstrim

    It's a temp folder; if applications are closed and there are no open file handles on the files, it should be save to erase them. I normally just cut and paste them to a temporary holding area for a bit and if nothing errors, crashes or complains delete them en mass.

    Is it normal? It's not too unusual. Depends on the applications sticking thing there and how well written they are at cleaning up after themselves. Other times you have applications crashing that leave crap behind and don't check for old temp files at startup to clean up again. Cruft collects. Hard disk space whittles away.

    Personal advice; move them to a temporary folder of your own making, if nothing happens after a day or two, delete them completely.

  • James Risto

    I use CLEANMGR.EXE to clean stuff like this.

  • Fiasco Labs

    On Windows 7, the personal temp folder has moved to C:\Users\%username%\AppData\Local\Temp\* and suffers the same indignities as all previous versions.

    Sort by date, remove all folders older than 3 days, remove all files older than 3 days.