How to view and remove temporary program files

Updated: 11/06/2021 by Computer Hope
Temporary folder
Note

This page relates to deleting .tmp files, not how to clear your browser Internet history or cache. For clearing Internet history, see: How do I clear my Internet browser history?

Windows 98, XP, Vista, 7, 8, and 10

If you are running any of these versions of Windows, we suggest running the Windows Disk Cleanup utility to delete temporary files and cleanup other portions of your computer.

  • See the Disk Cleanup definition for additional information and help.

Viewing and deleting temporary files

To view and delete temp files, open the Start menu and type %temp% in the Search field. In Windows XP and prior, click the Run option in the Start menu and type %temp% in the Run field. Press Enter and a Temp folder should open. You can delete all files found in this folder, and if any files are in use, they can be skipped.

After restarting the computer, some improvement in the performance of the computer should be noticed.

Searching for .tmp files

If you are running Windows 95, Windows 98, Windows NT, Windows ME, Windows 2000, or Windows XP, follow the instructions below to search for and delete any .tmp file found on your computer.

  1. Click the Start button to open the Start menu.
  2. Click the Find option, then click Find Files or folders.
  3. In the named box, type *.tmp to search for any files with a "tmp" file extension.
  4. Verify that the Look in section of the search box is pointing to the C: drive and not document folders.
  5. Click the Find Now button to start the search.
  6. Delete all files that are found.

Once the steps above are completed, we also recommend you ensure the temporary folder on the hard drive is empty by following the steps below.

  1. On the Windows desktop, double-click the My Computer icon.
  2. Double-click the C: drive.
  3. Double-click the Temp folder (if present) and verify that all files in this folder are deleted.
  4. Close the window and re-open My Computer.
  5. Double-click the C: drive.
  6. Double-click the Windows folder.
  7. Double-click the Temp folder (if present) and verify that all files in this folder are deleted.

If you are running MS-DOS or Windows 3.x, follow the instructions below to remove any temporary files currently on the computer.

  1. If you are currently in Windows, click File and choose the option to Exit Windows.
  2. At the prompt, run the following commands to delete all temporary files found in the root directory of the C drive.
del c:\*.tmp
  1. Next, run the following command to delete any files in the directory C:\TEMP, if it exists.
del c:\temp\*.*
  1. Next, run the following command to delete any files in the directory C:\WINDOWS\TEMP, if it exists.
del c:\windows\temp\*.*

Which temp files are safe to delete?

Because all temporary files are only a location to hold information temporarily, all temporary files are safe to delete. However, keep in mind that if a file or program is using that file, you may not be able to delete the file.

Unable to delete .tmp file

If you get an error when trying to delete a .tmp file, it is currently used by Windows or another software program that is running. Close all open programs, restart the computer, and try deleting the file again. If you are still having problems, see the document below.