您的 Windows 操作系统和许多第三方应用程序会在一天内在您的系统上创建数百个临时文件。(Temporary files)通常,这些文件不会引起任何问题,但是当它们的数量呈指数增长时,它们会阻塞硬盘驱动器上的宝贵空间并降低系统的整体性能。
通过删除所有此类缓存文件(deleting all such Cache files),您可以释放大量磁盘空间并让您的机器以最高效率运行。有很多方法可以删除Windows 10上的(Windows 10)临时(Temporary)文件。进一步阅读以了解它们。
临时文件 (Temporary files )由操作系统和计算机系统上运行的软件创建。临时文件以.tmp文件类型或以波浪号(.tmp)(~)开头。通常,临时文件是在Windows Temp 文件夹(Windows Temp folder )中创建的,并且出于多种原因使用,其中包括:
- 操作系统要求,例如为虚拟内存提供空间。
- 为进行中的工作创建的备份文件,如MS Office为其打开的文档创建的。
- 在程序运行时保存数据的应用程序的工作文件。
清除Windows 10(Windows 10)或任何其他版本的Windows中的临时文件有两个主要原因。其中包括重新获得存储空间和提高计算机性能。由于这些原因,建议您定期删除临时文件。
该文件夹位于c:/Windows/Temp,主要用于操作系统存储临时文件。您可以按Win + R键,输入“ temp”并按“ Enter”进入此文件夹。
当前登录用户使用:
该文件夹与登录系统的用户有关。您可以使用Windows 开始(Windows Start)菜单上的搜索字段来查找此临时文件夹。单击(Click)打开开始菜单并键入%temp%并从选项中选择最上面的结果。
Windows 11/10中删除临时(Temporary)文件的方法
以下指南将引导您完成清除临时文件的步骤。其中一些方法如下:
- 使用 Windows 设置
- 使用文件资源管理器(手动方法)
- 使用“存储感知”自动删除临时文件
- 创建 BAT 文件
- 使用命令提示符
- 使用磁盘清理
- 使用(Use)3rd-party Disk Cleaner软件。
让我们更详细地看看这些方法中的每一个。
1]使用Windows设置
Windows 允许您使用其设置应用程序(Settings App)来删除临时文件。以下是您可以如何使用此应用程序:
1]打开开始菜单(Start Menu),然后选择左侧边栏上显示的设置快捷方式。(Settings )选择小齿轮形图标后,Windows 设置(Windows Settings)页面将在您面前打开。
2]在新窗口中,导航到系统(System )部分。
3]从左侧选项中,选择存储(Storage)
4]您将在右侧部分看到您的磁盘选项,选择您的磁盘,然后单击临时文件(Temporary files)选项。
5] Windows现在将扫描临时文件夹;该过程完成后,您可以选择要删除的文件。
6]要删除复选框,然后单击删除文件(Remove files)以确认您的操作。
完毕!成功完成上述步骤后,垃圾文件将从您的系统中删除。
2]使用文件资源管理器(File Explorer)(手动方法(Manual Method))
使用Windows 文件资源管理器是在(Windows File Explorer)Windows 10中删除临时文件的另一种简单方法。跟着这些步骤:
1] 按Win + R键打开“运行”(Run)对话框。
2] 键入命令%temp%并按Enter打开系统上的临时文件夹。
3]使用快捷键Ctrl + A选择文件夹内的所有文件。选择文件后,右键单击(right-click)并从上下文菜单中选择删除选项。(Delete)
请注意(Please note)- 您需要管理员帐户才能执行此操作。此外,一旦临时文件被删除,它们就会被移动到回收站(Recycle Bin),因此可以恢复它们。
3]使用存储(Use Storage)感知自动删除临时文件
用户可以使用Storage Sense自动从系统中删除临时文件。以下是您可以使用的方法:
1]转到设置(Settings)应用程序。
2]单击系统(System)选项,然后从左侧面板选项中选择存储。(Storage)
3] 在存储(Storage)部分中,打开名为Storage Sense的切换开关。
一旦您在系统上激活存储感知,它将删除临时文件,包括已在回收站中超过 30 天的文件。这是默认配置,但用户始终可以配置Storage Sense的默认设置。
为此,请单击更改(Change)我们自动释放空间的方式选项卡并调整清理设置或按需运行 Storage Sense 。
4]创建一个BAT文件
在此方法中,您需要创建一个BAT文件。创建此文件后,可以重复使用它来删除Windows 10上的临时文件。这个非常简单的选项可以快速工作。要创建BAT 文件(BAT File),请执行以下步骤:
1]从开始菜单打开记事本(Notepad)
2]在记事本(Notepad)应用程序中,复制以下内容:
del C:\Users\%username%\AppData\Local\Temp /f /s /q
rd C:\Users\%username%\AppData\Local\Temp /s /q
del c:\Windows\Temp /f /s /q
rd c:\Windows\Temp /s /q
pause
3]使用扩展名将此文件保存到您的桌面。蝙蝠(bat)。这里文件被命名为Clean Temp。
4]完成后,将在您的桌面上创建一个BAT文件。(BAT file)
5]现在,每当您希望删除Windows 10上的临时文件时,右键单击此文件并选择以管理员身份运行选项。(Run as Administrator.)
完毕!
5]使用命令提示符
Windows 10 上的临时文件也可以通过在命令提示符(Command Prompt)中运行一些命令来删除。请按照(Follow)以下步骤操作:
1]打开开始菜单(Start Menu)并键入cmd。
2]在搜索结果中,右键单击并单击以管理员身份运行(Run as Administrator)选项。
3]使用管理权限打开命令提示符窗口后,复制以下命令:
cleanmgr /d <driveletter>
不要忘记更改命令中的<driveletter>字段并删除括号。
4] 现在,按Enter(Enter)键执行命令。
等待该过程完成。
6]使用磁盘清理
磁盘清理实用程序是在(Disk Cleanup)Windows 10上清理临时文件的另一种简单有效的方法。阅读我们的指南使用磁盘清理工具删除临时文件。
7]使用(Use)第3方磁盘清理(Disk Cleaner)软件
您还可以使用免费的垃圾文件和磁盘清理软件(free junk file and disk cleaner software)来删除您的垃圾文件。
我们希望本指南能帮助您删除Windows 10上的临时文件,并成功为存储新文件腾出一些空间。如果您有任何类似的技巧来执行此过程,请在下面的评论部分与我们分享。
Different ways to delete Temporary Files in Windows 11/10
Your Windows operating system and many thіrd-party applicatіons create hundreds of Temporary files on your system in one single day. Normally, these files do not cause any issue, but when they increase exponentially in numbers, they block valuable space on the hard drive and degrade the overall performance of your system.
By deleting all such Cache files, you can free up a lot of disk space and keep your machine running at peak efficiency. There are many ways to delete Temporary files on Windows 10. Read further to know them.
Temporary files are created by both the Operating System and the software running on your computer system. Temporary files are denoted with a file type of .tmp or prefaced with a tilde (~). Typically, temporary files are created in the Windows Temp folder and are used for many reasons, these include the following:
- OS requirements, like providing space for virtual memory.
- Back-up files created for work-in-progress like MS Office creates for its open documents.
- Work files for applications that hold data while the program is running.
There are two main reasons to clear out the temporary files in Windows 10 or any other version of Windows. These include regaining storage space and improving computer performance. For these reasons, it is advised that you delete the temporary files periodically.
This folder is located at c:/Windows/Temp and mainly used by the operating system to store the temporary files. You can press Win + R key, type ‘temp’ and hit ‘Enter’ to go to this folder.
Used by the current logged in user:
This folder is related to the user logging into the system. You can use the search field on the Windows Start menu to locate this temp folder. Click open the start menu and type %temp% and select the top result from the option.
Ways to delete Temporary files in Windows 11/10
Here is the guide that will take you through the steps of clearing temporary files. Some of these methods are as follows:
- Using Windows Settings
- Using File Explorer (Manual Method)
- Use “Storage sense” to automatically delete temporary files
- Create a BAT file
- Using Command Prompt
- Using Disk Cleanup
- Use 3rd-party Disk Cleaner software.
Let us look at each of these methods in more detail.
1] Using Windows Settings
Windows allows you to use its Settings App to remove the temporary files. Here is how you can use this application:
1] Open the Start Menu and select the Settings shortcut appearing on the left sidebar. Once you select the little gear-shaped icon, the Windows Settings page opens in front of you.
2] In the new windows, navigate to the System section.
3] From the left side options, select Storage
4] You will see your disk’s option on the right section, select your disk, and click on the Temporary files option.
5] Windows will now scan the temporary files folder; once the process is completed, you can select the files you want to remove.
6] To delete check the boxes and then click Remove files to confirm your action.
Done! After you successfully complete the above steps, the junk files will be removed from your system.
2] Using File Explorer (Manual Method)
Using the Windows File Explorer is another simple way of removing temporary files in Windows 10. Follow these steps:
1] Press Win + R keys to open the Run dialog.
2] Type the command %temp% and press Enter to open the temporary files folder on your system.
3] Use shortcut Ctrl + A to select all the files inside the folder. Once the files are selected, right-click and select the Delete option from the context menu.
Please note – you will need an administrator account to perform this action. Also, once the temporary files are deleted, these are moved to the Recycle Bin hence, restoring them is possible.
3] Use Storage sense to automatically delete temporary files
A user can use Storage Sense to remove temporary files automatically from the system. Here is how you can use:
1] Go to the Settings application.
2] Click on the System option and select Storage from the left-hand panel options.
3] In the Storage section, turn the toggle named Storage Sense ON.
Once you activate Storage sense on your system, it will delete the temporary files including the ones which have been in the recycle bin for more than 30 days. This was the default configuration, but the user can always configure the default settings of Storage Sense.
To do this, click Change how we free up space automatically tab and adjust the cleanup settings or run Storage Sense on-demand.
4] Create a BAT file
In this method, you need to create a BAT file. Once this file is created it can be used repeatedly to delete the temporary files on Windows 10. This very simple option works quickly. To create a BAT File, follow these steps:
1] From the Start Menu open the Notepad
2] In the Notepad app, copy the following:
del C:\Users\%username%\AppData\Local\Temp /f /s /q
rd C:\Users\%username%\AppData\Local\Temp /s /q
del c:\Windows\Temp /f /s /q
rd c:\Windows\Temp /s /q
pause
3] Save this file to your desktop using the extension .bat. Here the file is named as Clean Temp.
4] Once done, a BAT file will be created on your desktop.
5] Now, whenever you wish to delete the temporary files on Windows 10, right-click on this file and select the option Run as Administrator.
Done!
5] Using Command Prompt
Temporary files on Windows 10 can also be deleted by running some commands in the Command Prompt. Follow these steps:
1] Open the Start Menu and type cmd.
2] In the search results, right-click and click the Run as Administrator option.
3] Once the command prompt window is open with the administrative right, copy the following command:
cleanmgr /d <driveletter>
Do not forget to alter the <driveletter> field in the command and remove the brackets.
4] Now, execute the command by hitting the Enter key.
Wait for the process to complete.
6] Using Disk Cleanup
The Disk Cleanup utility is another simple and efficient way to clean temporary files on Windows 10. Read our guide Delete Temporary Files using Disk Cleanup Tool.
7] Use 3rd-party Disk Cleaner software
You can also use a free junk file and disk cleaner software to delete your junk files.
We hope that this guide did help you in deleting the temporary files on Windows 10 and you successfully made some room for storing new files. If you any similar tricks to perform this process, do share them with us in the comments section below.