clean out windows\temp??

My question  is what, (if anything) to do with my apparently bloated windows\temp folder. Win98 occasionally "hangs" or "freezes" on me. Once or twice a week - no big deal. I've heard and read that
housecleaning the windows\temp folder tends to improve stability. Even read recently that all files dated earlier than *today* s/b deleted. Here's a description of the contents of my temp folder: 37 MB, 19 subfolders, many of which are empty, some of which contain folders, and most of which have obscure names. Also about 200 files of various types: exe's, jpg's, htm's, doc's, etc. I recognize some of these as copies of files I have elsewhere (or have deleted), and some are totally unrecognizable. Many of the files have  .tmp extension and are 22kb in size; some .tmp's are 0kb.

Obviously, I could look at each file and decide what to do, but I don't have a month to spare ;-). Another alternative is to back up the entire 37MB and delete the entire contents; this frightens me. Or I could just ignore it - I don't presently need the 37 MB of disk space.

Expert recommendation, please?
Who is Participating?
As stated by compmania, they are pieces of leftover installs of programs.

When you do an install, and you see where the files are being unzipped to the temp folder,
then the program gets installed from those unzipped items.
A well written program will also have in it to delete the installation pieces, one of the things that happens when you reboot.
Many programs dont, and leave the pieces where they are, the temp folder, which is the default for the installation program.
If you unzip the program to a different folder, then it would leave them there.

Beside the obvious that it's taking up space, there also the possibility of conflicting with the system and applications that use many of those parts
that are duplicates in the temp folder, and you start getting error messages.

The word temp is short for "temporary", so out they go.

Open the temp folder, from file menu, select all, right click and delete.

If you need more convincing, in win98 right click you C: drive, go to properties, click on disk cleanup and see your options.

If there's paranoia about deletions, then you can

1) copy folder and contents to Zip disk or other media, keep until you're comfortable to trash.

2) Use Winzip or similar, turn it into a zip file and get rid of the real contents of the folder.

Should you by some strange reason need any of the files, from 1) you can copy the file you want, and from 2) you can use SFC to extract the file you're looking for, without unzipping again.

When you've completed the manuvering, its also a good idea to clean your registry.

Reboot to dos, and at prompt type


and hit the enter key.

Reboot and your pc will thank you.

Speaking for myself, what I do is reboot the pc and then just do START - RUN 'C:\windows\temp' Select and delete everything.  If its important it'll get recreated.  Rebooting ensures you won't lose any data.
I have pulled back on the stick a little over the last couple of reinterations of Windows. Some programs will put little bits of uninstall information in the Temp directory, so now I just take a little bit of time once a month, and open the temp directory, then go up to TOOLS/FIND/FILES & FOLDERS, and enter *.TMP, enter, then delete these. If it is filling up with Gifs, Htms I wonder if you have directed your Temporary Internet Files to this folder. If so, I would redirect them to another folder, then you can just delete the Temporary Internet contents without possible loosing some uninstall info

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hope this helps.


Despite this age of PC-based GUIs, many operating system maintenance tasks are still best performed from the DOS command prompt. One of these is cleaning up after sloppy applications that leave trails behind in the form of temp files. I use an application that is particularly egregious in this regard. It creates a new set of multilevel subdirectories off the system's temp directory each time it runs. After a few sessions, I end up with several unused trees of temporary directories and files that are a hassle to remove manually.

To automate the process, I dug into the undocumented depths of DELTREE. It turns out that with the proper syntax, DELTREE is an efficient tool with which to clear out all the junk in a multilevel directory tree. But if you use DELTREE as documented, it also deletes the directory you are trying to clean up. For example, the command

    deltree/y c:\temp

removes everything, including the TEMP directory itself (the /y parameter suppresses deletion confirmation).

If, however, you add a backslash to the end of the command, so that it becomes

    deltree/y c:\temp\

the TEMP directory is left intact and empty. Nothing in the DOS 6.2x or 7.0 help files gives any hint of this useful behavior. I now use the DELTREE command in my AUTOEXEC.BAT file, to clean up the temp directory automatically each time the system boots.

Just go to start, shutdown, restart in msdos mode, you should be in the c:\windows> dir, do a cd temp then a del *.*

All the files in the c:\windows\temp dir are just leftover from installs of programs etc... so if you delete them nothing should happen.
EvilEye24, putting it simply TEMP means what it says.

I believe most of i have to say here has already been posted so here's my 2 cents worth.

Its the default conventional place to temporarily open files. As stated above, these are usually self unpacking install files. Any program that leaves info in this directory expecting it to be there after a reboot isn't designed to work.

2 lines i have had in my autoexec.bat for several years are:

DelTree /Y C:\WINDOWS\Temp

I have not had any problems.

There may be arguements to say what happens if the system crashes, well to that i can say most MS windows progams when making temp personal original data backups like Word, tend to place these elswhere and most ask for a default storage dir when you set them up.


Just my personal two cents here... I keep a shortcut to my windows\temp folder on my desktop and delete *everything* in it on an average of once a day at shutdown. If there happens to be something in there that Windows or an open application needs, an error appears stating that access to the file is denied (pretty easy way of determining what stays and what goes ;o).
I have never experienced a problem with doing this, I have however had much experience with problems relating to a bloated temp folder (there is a limit to the # of files/folders that are allowed in there)or the existence of leftover/corrupted files there. The presence of these files in the recycle bin, typically poses no problem, and *if* the files do turn out to be needed they can be restored from there.

The only exception to my habit of clearing this folder is if I have just done an install or upgrade/patch, many times "cleanup" files or instructions for system file updates during reboot are contained in the temp folder, so I let them do their thing and get them cleaned out next time.

Hope this helps!
EvilEye24Author Commented:
thanx for the guidance. I followed your recommendations, and all seems to be well.
Glad to hear it, and thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.