• Clearing out temporary files

    Home » Forums » AskWoody support » Windows » Windows 7 » Questions: Windows 7 » Clearing out temporary files

    Author
    Topic
    #478274

    Since getting a W7 computer, I notice that there seems to be more temp files (%temp%), and the folder doesn’t seem to eliminate them itself. I’ve been going through them now and then, and deleting anything over a month old. Even now, it shows as 376MB in Disk Cleanup and has over 200 files in it.
    Having a SSD, I try to keep it free of anything not needed.

    I do run Disk Cleanup each night and always check the boxes for Temp Internet Files, Offline Web Pages and Recycle Bin, but rarely anything else. I’m never sure if it’s OK to completely delete all the Temporary Files.

    Viewing 16 reply threads
    Author
    Replies
    • #1292012

      Hi Pictor,
      A better cleaning tool is http://www.filehippo.com/download_ccleaner/ use it with default setting, but I always untick ‘Empty Recyclebin’

    • #1292019

      Since getting a W7 computer, I notice that there seems to be more temp files (%temp%), and the folder doesn’t seem to eliminate them itself. I’ve been going through them now and then, and deleting anything over a month old. Even now, it shows as 376MB in Disk Cleanup and has over 200 files in it.
      Having a SSD, I try to keep it free of anything not needed.

      I do run Disk Cleanup each night and always check the boxes for Temp Internet Files, Offline Web Pages and Recycle Bin, but rarely anything else. I’m never sure if it’s OK to completely delete all the Temporary Files.

      I concur with your observation about more temporary files.

      As long as you have the bare minimum set of programs running you should be able to delete any and all temporary files. Just be sure you do not have any install or uninstall activities pending a reboot.

      Joe

      --Joe

    • #1292028

      Thanks Joe – I don’t have a lot running all the time (ACDSee, Kaspersky, ADCalendar, plus of course Outlook, and IE most of the time – I regularly use Photoshop & download images from my camera too) – all are closed down before I run Disk Cleanup.

      So, as long as I didn’t install or uninstall anything on a day I choose to empty that folder, it should be OK ?

      I also tend to leave deleted things like this in the recycle bin for a day or so until I’m sure everything works – even though I’d be hard pressed to know which the culprit was 🙂

      Thanks Roderunner also – if at all possible I don’t want to install any programmes that I can live without. I don’t even have Superantispyware installed on this computer, and use their online scanner instead every couple of weeks for deleting tracking cookies.

    • #1292036

      You should be OK. I’d make sure to shutdown Photoshop, Outlook, & IE just to be extra careful.

      Joe

      --Joe

    • #1292130

      Thanks Joe – I only do Disk Cleanup and manual deleting of those temp files last thing at night when everything else is shut down, so I’ll delete a chunk of those and see how that goes 🙂

      • #1292133

        I only do Disk Cleanup and manual deleting of those temp files last thing at night when everything else is shut down, so I’ll delete a chunk of those and see how that goes 🙂

        Pictor,
        Hello,
        I would like to add that i have been (manually deleting ) “Temp files” on all my OS’s with no problems… In addition to CCleaner. If you go to C:> Users>”Your PC Name”>AppData>Local>Temp… and select all files to delete. If you OS needs it … it won’t be removed … The rest will .:cheers: Regards Fred

        • #1292136

          Pictor,
          If you go to C:> Users>”Your PC Name”>AppData>Local>Temp… and select all files to delete. If you OS needs it … it won’t be removed … The rest will .:cheers: Regards Fred

          I agree with that but it is a heck of a lot faster using %temp% to get to the temporary files folder:B):

          Just checked mine and it has 144MB of detritus and I honestly can’t say when I last cleared that folder as I have never seen the build-up of remnants that happened in previous versions of Windows.

        • #1292272

          Pictor,
          Hello,
          If you OS needs it … it won’t be removed … The rest will .:cheers: Regards Fred

          Thanks Fred – that confirms what I suspected the one time I checked the box for temporary files in disk Cleanup shortly after I got the W7 computer …it left quite a number behind.

          I always go into the temp folder by start, type in %temp%, then press enter. I selected only files up to around two weeks ago last night and deleted those for now – it halved the size of the folder, and everything seems to be working OK today.

        • #1292868

          Pictor,
          Hello,
          I would like to add that i have been (manually deleting ) “Temp files” on all my OS’s with no problems… In addition to CCleaner. If you go to C:> Users>”Your PC Name”>AppData>Local>Temp… and select all files to delete. If you OS needs it … it won’t be removed … The rest will .:cheers: Regards Fred

          You can add that and any other temp file locations to Ccleaner by adding those paths to the Options/Include window. Click the Add button and fill in the path and choose the options. For this path I choose the optiona All files and Files and subfolders. This saves the manual deletion. I make a shortcut to the temp file and use it as a handy way to copy and paste the path vs. manually typing the path.

    • #1292154

      I also use CCleaner as well as Privacy Mantrafor cleaning temp files. In addition I use a batch file originally developed by Fred Langa to help with this process. This batch file runs Disk Cleanup in the super setting (you pick out what you wish to clean) as well as cleaning any temp folder you specify. Just cut and paste into Notepad, then save to your desktop as Cleanup.bat. (Obviously you would have to modify the paths for your PC):

      cleanmgr /sageset:99
      del /q /s “C:UsersTedAppDataLocalTemp*.*”
      del /q /s “C:WindowsTemp*.*”
      del /q /s “C:Temp*.*”
      cleanmgr /sagerun:99

      cleanmgr is Win 7 Disk Cleanup. In addition I have specifiedd 3 additional folders. You can specify and temp location you wish, including log files, etc.

      This is specifically for Win 7, but if you have another OS, the batch file can be modified for any version of Windows. I started using this during Win 98 and coninued through all versions to Win 7.

    • #1292194

      I’ve a BATch file which I’ve been quite happily using for years, on XP and Windows 7, which includes the line
      del c:*.tmp /s

      On Windows 7 it deletes a bunch of files from C:Windowswinsxs with extensions “tmpll” and “tmplx”, but I haven’t seen a problem from this yet…

      BATcher

      Plethora means a lot to me.

      • #1292197

        I’ve a BATch file which I’ve been quite happily using for years, on XP and Windows 7, which includes the line
        del c:*.tmp /s

        On Windows 7 it deletes a bunch of files from C:Windowswinsxs with extensions “tmpll” and “tmplx”, but I haven’t seen a problem from this yet…

        This article, Sharing Start GPOs mentions .tmplx files. Does this apply? I can’t find anything useful on .tmpll files though.

        Joe

        --Joe

    • #1292285

      For a bit more advanced cleaning (run as a batchfile) above the sageset 99;

      %SystemRoot%System32Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

      But be warned, this can damage your ability to uninstall WU and service packs.

    • #1292398

      The nice thing about using a batch file that you write yourself, (or get some help from a friend) is that you can be very specific about just what junk you delete and when you delete it.

      A simple one-liner can do a lot, but searching through your HD for places that programs store .tmp files, .bak files, .log files, etc. can go a long ways toward keeping your HD clean, lean and mean. (running much more efficiently)

      For all the older OS’s, up through XP, I used the Deltree.exe command for deleting junk, It’s a very powerful command (DOS external command) and can take out just one file, one type of file or it can delete a whole file tree, sub-directories, etc.
      Example:

      Deltree /y “C:temp*.*”
      or
      Deltree /y “C:WindowsTemp*.*”

      or, for deleting the Firefox Temporary Internet Files
      Deltree /y “%SystemDrive%Documents and SettingsAlexiLocal SettingsApplication DataMozillaFirefoxProfilesrilwr39v.defaultCache*.*”
      * that exact path will be different on every computer

      Some junk folders are so well hidden, that you really have to look for them.
      But the effort does pay off in the long run, with a cleaner and more efficient computer.

      Vista and W-7 didn’t seem to want to accept the Deltree program, so I use this statement to replace it.

      Echo Y| Del “C:temp*.*”

      then Del won’t stop to ask me “are you sure” or some such thing.

      I know from years of experience that most users won’t do their maintenance even if the shortcut is right on their desktop, so I install my cleanup batch file in the root directory and then put a shortcut to it in the Startup folder, so they get a free cleanup every time the computer is booted up. In the shortcut, I set it to run ‘Minimized’ so they never see it on their screen.
      I use a short and pretty Generic cleanup batch file for my customers, but a much longer and more detailed Cleanup batch file for myself. My own Cleanup.bat program is almost 30 lines long.

      You can use the windows search app to find the location of files with certain extensions, like search for:
      *.tmp
      *.bak
      *.bac
      *.~mp

      Then you can look for certain folder names like “Cache” and “temp”.

      Happy Computing!
      😎

      • #1292422

        Vista and W-7 didn’t seem to want to accept the Deltree program, so I use this statement to replace it.
        Echo Y| Del “C:temp*.*”
        then Del won’t stop to ask me “are you sure” or some such thing.

        It looks like it was some time since you did DEL /? on Vista or Windows 7!
        Have a look at the /Q switch…

        BATcher

        Plethora means a lot to me.

        • #1301660

          THis is very simple.
          Just type “temp” on run command and after that hit the enter.

          Then select all and press delete.

          • #1302027

            The cleanmgr sageset trick works for XP & Win-7. I think you have to run it manually first with the /sageset option to tell it what to clean up when you run it with the /sagerun option.

            Also, if you are worried about space and/or write-cycles on the drive, you can change the %temp% & %tmp% variables to point to a mechanical drive.

        • #1390375

          Bee reading this thread since I too was seeing a lot of files show up via %temp% after i went thru the Internet/Options method of Deleting Temp Files. Win7. I am left with questions.
          1. Why did the Interet/Options method to delete all the Temp Files not delete all the files?
          2. Did it actually delete anything?
          3. I gather the whole intent is to boot and run faster.. true?
          4. Does it hurt to just leave them there?
          5. I am a hesitant to use one of the methods by prior responders. Hate to do this then find I am now having ‘strange’ behavior problems! Am I being overly cautious?

          Thanks for any feedback!

          • #1390381

            I’ve not had a problem so far, and been dealing with them in the same way for a long time now. I just type in %temp% (Start>search programs & files) and delete anything more than two weeks old.
            I then leave them in the recycle bin for a few days to check that everything is still working OK. I’ve never had to put any back.

            The computer company said 7 days old should be long enough to keep, but I still only delete those over 14 days old.

    • #1292426

      BATcher, As you can see I use the /Q switch. If I’m not mistaken this is the quiet switch to allow the deletion to continue at each step without the operator having to intervine. I may be wrong

      This is a somewhat old list, unsure if it’s up to date:

      MS Command-line Switches.
      I thought this might be helpful for others just beginning in this “play time”.

      • #1292699

        BATcher, As you can see I use the /Q switch. If I’m not mistaken this is the quiet switch to allow the deletion to continue at each step without the operator having to intervine. I may be wrong This is a somewhat old list, unsure if it’s up to date: MS Command-line Switches. I thought this might be helpful for others just beginning in this “play time”.

        I don’t know if I’m out of time here, but on my XP machine, I just did an entry at the command prompt:
        del /? > C:delete.txt (that sends the output of the /? switch to a text file in the root directory, from which it can then be pulled up in Wordpad and printed out for future reference.)

        And I found this information about the Del command:
        /P Prompts for confirmation before deleting each file.
        /F Force deleting of read-only files.
        /S Delete specified files from all subdirectories.
        /Q Quiet mode, do not ask if ok to delete on global wildcard
        /A Selects files to delete based on attributes
        File attributes: R= Read-only files, S= System files, H= Hidden files, A= Files ready for archiving, – Prefix meaning not

        From this a person could deduce that the /Q switch only works when you’re using a wild card in the del statement. ??? Based on this info, would the /Q switch still work if a specific filename were being deleted? Just curious and still learning,

        The Doctor:cool:

    • #1292576

      Shazam – I tried that %temp% thingie and came up with 870+MB of files. Some dating back to the beginning of the year 2010. I deleted all but the last two weeks. BUT – did an Acronis B/U prior to doing that just to be safe. Ya never know. Thanks – Lee aka The Ole Sarge

    • #1292679

      Yes, SAFE rather than Sorry, is always a good idea, but really……. do you really understand the meaning of “Temporary” ????

      Generally speaking, it means that the file was important to the program that created it, at the time that program was still running, not the next day, or the next month, etc. I explain that to total Nubes as yesterday’s coffee grounds, or potato peels, or last weeks daily news paper. Garbage, pure garbage!

      I recently had to clean up a PC that was 8 years old and had never been cleaned up in its lifetime.
      I removed over 500,000 junk files, totaling over 2 gig’s of HD space. That PC took about 20 minutes to boot up and over five minutes to shut down (if memory serves). Just wading through the junk was terribly time consuming. I ran my generic Cleanup.bat program first, and it ran for almost 15 minutes.
      I had plenty of time to get acquainted with a really neat guy, 86 years old.

      For as long as there has been such a thing as a Temporary file, I’ve been deleting them with never any regrets.
      Every browser, for instance, saves Temporary Internet Files in their own folders, with their own file-names.
      Most cleanup programs will only delete the T.I.F.’s from I.E. and totally ignore those from Firefox, for instance.

      I’ve searched and searched all over my HD for temp files created by user programs and just when I think I’ve found them all, Ooooops, up pops another one. Whenever I find a new hiding place for tmp files, bak files and useless log files, I add that location to my Cleanup.bat batch file program.

      But if I want to share that program with a friend, I have to go through it and customize it to reflect the actual paths on the other persons PC. The Cleanup.bat program that I share on my web page, is totally Generic and only incorporates paths that are present on most PC’s. For the most part, that only includes temp files that are created by the OS.

      I’ve run several well known and some not so well known Cleanup programs and for the most part, they don’t clean out much of the garbage that my own Cleanup.bat program cleans out.

      But I guess, each user has to use the programs that they feel comfortable with.

      Cheers Mates!
      The Doctor 😎

      PS: just for fun:
      I did a search for *.tmp files on my C: drive and found this folder that I’d not seen before.
      It had over 50 meg’s of temp files in it. So I added the following line to my cleanup.bat program.
      deltree /y “C:Documents and SettingsAll UsersApplication DataAVG10Temp*.*”

      Give it a try! Search your own C: drive for *.tmp and see what pops up.
      You might just be surprised, or maybe even Horrified! :rolleyes:

    • #1292705

      Appologies!

      That last post ran all together and I was not able to edit and fix it.

      And, I can’t post any smilies! That really sucks!

      The Doctor:cool:

      PS: After rebooting my PC, things seem to be working correctly again.
      I’ll go back and see if I can repair my last post. Right now, it’s a mess.

    • #1292768

      Hi,
      I’m a user of Norton 360. Using the Custom Scan feature I check the delete the Windows Temporary Files and Internet Explorer Temporary Files boxes. Clears them out for me.

    • #1302072

      I use something similar in that I use a batch file on my desktop as follows:

      cleanmgr /sageset:99
      del /q /s “C:UsersTedAppDataLocalTemp*.*”
      del /q /s “C:WindowsTemp*.*”
      del /q /s “C:Temp*.*”
      cleanmgr /sagerun:99

      Obviously you would have to insert your own path names. You can add any files you wish to the batch file. I open Notepad, add whatever I want then save as Cleanup.bat to my desktop. I did find that once I ran sageset:99 once I could remove it from the batch file and it continued afterward, but I have left it just because.

      note: the original batch file is from Fred Langa back in Win 98. Thanks to Fred for the idea.

    • #1302104

      Privacy Mantra (Free) by CodeOde is another alternative cleaning program that I have gotten to like recently.
      It’s primary focus is on protecting personal privacy, as opposed to a powerful batch file for cleaning purposes.
      Requires a system boot in order to effect the removal of the index.dat files. I use this in conjunction with CCleaner which also does
      render the index.dat file unreadable, but it will not delete the actual file…only the contents while preserving it’s filesize.

      Privacy Mantra keeps your computer clean from online and offline tracks. Most people are unaware of that every web site they have visited remains in the undeletable index.dat file, even after the Internet history and cache has been removed. Your system is also keeping information of executables you run, movies you watch and documents you open. Some of these prints can’t be deleted manually as they are locked by the system.

      Privacy Mantra will erase and wash away most privacy threats in your machine including, Internet history, cache, cookies, index.dat files, auto-complete forms, search assistant, recent documents, open/save dialogs, run files, Mozilla Firefox, Google Toolbar and more. Privacy Mantra allows the user to easily download the latest database of threats. This reliable cleaner will not only protect your privacy but also free disk space by deleting junk files. For maximum flexibility you can also create your own cleaning plugins and download others.
      Privacy Mantra is Windows NT/2000/XP/2003/Vista/7 compatible, support for 32-bit and 64-bit operating systems.

      Privacy Mantra Location Database

      How to remove index.dat files?

      I’m not affiliated with this software in any way other than I like the program and use it.

    • #1302128

      I should have added I use the batch file combined with CCleaner and Privacy Mantra for my cleanup needs as well.

    Viewing 16 reply threads
    Reply To: Clearing out temporary files

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: