clean out windows\temp??

Posted on 2000-03-05
Last Modified: 2013-12-28
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?
Question by:EvilEye24

Expert Comment

Comment Utility
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.
LVL 13

Expert Comment

Comment Utility
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

LVL 15

Expert Comment

Comment Utility
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.


Expert Comment

Comment Utility
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.
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

LVL 18

Accepted Solution

centerv earned 100 total points
Comment Utility
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.


Expert Comment

Comment Utility
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.


Expert Comment

Comment Utility

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!

Author Comment

Comment Utility
thanx for the guidance. I followed your recommendations, and all seems to be well.
LVL 18

Expert Comment

Comment Utility
Glad to hear it, and thanks.

Featured Post

How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now