在 PC 上运行的 Windows 11 或 Windows 10 安装中,默认情况下,DriverStore 文件夹(DriverStore folder)是系统上安装的所有驱动程序的安全位置。通常,即使长时间使用计算机,此文件夹也不会占用驱动器存储空间。然而(Nevertheless),一些Windows PC 用户报告注意到该文件夹占用了大量的磁盘空间。这篇文章将向您展示在 Windows 11/10中安全清理 DriverStore File Repository 文件夹的方法。(ways to safely clean DriverStore File Repository folder)
System32 中的 DriverStore 是什么?
驱动程序存储(Driver Store)库是第三方驱动程序包以及系统附带的本机设备驱动程序的可信集合,这些驱动程序保存在本地硬盘上的安全位置。在安装驱动程序之前,必须首先将其注入位于C:\Windows\System32\DriverStore\FileRepository下的驱动程序存储中。驱动程序包中的所有文件都被认为对设备安装至关重要。
将驱动程序包复制到驱动程序存储时,会复制其所有文件。这包括INF文件和(INF)INF文件引用的所有文件。驱动程序包中的所有文件都被认为对设备安装至关重要。将驱动程序包复制到驱动程序存储的过程称为暂存。必须先将驱动程序包暂存到驱动程序存储区,然后才能使用该程序包安装任何设备。
删除DriverStore文件夹是否安全?
如果您删除Windows PC 上的所有(Windows)DriverStore文件夹内容,此操作将导致错误、崩溃等。在最严重的情况下,它可能会导致您的系统或相关硬件无法运行。所以基本上你需要知道你要删除什么。作为预防措施,我们强烈建议您先创建一个还原点,然后再从该文件夹中删除任何驱动程序文件。
如何在Windows 11/10DriverStore文件夹
我们可以通过以下简单方法清理Windows 11/10DriverStore文件夹。我们将在本节中概述的方法下探索这个主题,如下所示:
- 使用磁盘清理——最安全的方法
- 使用命令提示符
- 使用批处理文件
- 使用 DriverStore Explorer。
让我们看一下与每种方法相关的分步过程的描述。
1]使用磁盘清理安全清理(Disk Clean-up)DriverStore文件夹(DriverStore)
这是清理DriverStore最安全、最简单、最直接的方法。磁盘清理工具(Disk Cleanup Tool)可以从您的 Windows 11/10 计算机中清理和删除旧的、不必要的驱动程序。
- 启动实用程序时,选择要清理的驱动器。
- 接下来按清理系统文件(Clean up system files)。
- 现在选择设备驱动程序包(Device Driver Packages)和您想要的任何其他选项。
- 按 OK 运行该工具。
您还可以使用 Advanced Disk Cleanup Utility 的命令行版本(use Command-line version of Advanced Disk Cleanup Utility)。
2]使用命令提示符(Command Prompt)清理DriverStore文件夹(Clean DriverStore)
在 Windows11/10 PC 上清理DriverStore文件夹的另一种方法是使用Command Prompt。
要使用命令提示符(Command Prompt)清理Windows11/10 PC 上的DriverStore文件夹,请执行以下操作:
- 按Windows key + R调用“运行”对话框。
- 在“运行”对话框中,键入cmd,然后按CTRL + SHIFT + ENTER以提升模式打开命令提示符(open Command Prompt in elevated mode)。
命令提示符窗口打开后,按照本指南中有关如何使用命令提示符卸载驱动程序(how to uninstall drivers using the command prompt)的说明进行操作。
3]使用批处理(Batch)文件清理DriverStore文件夹(Clean DriverStore)
要通过创建批处理文件来清理Windows11/10 PC 上的DriverStore文件夹,然后运行 .bat 文件,请执行以下操作:
- 按Windows key + R调用“运行”对话框。
- 在“运行”对话框中,键入记事本(notepad)并按 Enter 键打开记事本(open Notepad)。
- 将以下语法复制并粘贴到文本编辑器中。
@echo off
for /L %%N in (1,1,600) do (
echo Deleting driver OEM%%N.INF
pnputil /d OEM%%N.INF
)
- 使用名称保存文件并附加.bat 文件扩展名 - 例如; DScleanup.bat并在 Save as type 框中选择 All Files 。
要清理DriverStore文件夹,请导航到保存文件的位置并以管理员权限运行批处理文件(run the batch file with admin privilege) (右键单击保存的文件并 从上下文菜单中选择以管理员身份运行)。(Run as Administrator)
4]使用DriverStore资源管理器
DriverStore Explorer是一款免费软件,可帮助您轻松管理、列出、添加或删除 PC 上安装的设备驱动程序。它可能无法删除系统关键驱动程序——这很好!
这就是在Windows 11/10DriverStore文件夹的方法!
如何从DriverStore卸载驱动程序?
Windows用户可以通过两种主要方式从Windows计算机上的驱动程序存储中安全地卸载或删除驱动程序包:使用命令提示符卸载驱动程序或通过设备管理器卸载驱动程序。对于显示器等一些硬件,您可以使用专用的卸载程序 - Display Driver Uninstaller。
相关文章(Related post):使用 DriverStore Explorer 管理 Driver Store 文件夹中的设备驱动程序。(Manage Device Drivers in the Driver Store folder with DriverStore Explorer.)
How to safely cleanup DriverStore folder in Windows 11/10
On a running Windows 11 or Wіndows 10 installation on a PC, by default, the DriverStore folder is the safe location of all the drivers installed on your system. Usually, even with prolonged computer use, this folder doesn’t hog drive storage space. Nevertheless, some Windows PC users are reporting noticing the folder consuming a very significant amount of disk space. This post will show you the ways to safely clean DriverStore File Repository folder in Windows 11/10.
What is DriverStore in System32?
The Driver Store is a trusted collection of third-party driver packages as well as native device drivers that ship with the system, which is maintained in a secure location on the local hard disk. Before a driver can be installed, it must first be injected into the driver store which is located under C:\Windows\System32\DriverStore\FileRepository. All files that are in the driver package are considered critical to the device installation.
When a driver package is copied to the driver store, all of its files are copied. This includes the INF file and all files that are referenced by the INF file. All files that are in the driver package are considered critical to the device installation. The process of copying a driver package to the driver store is called staging. A driver package must be staged to the driver store before the package can be used to install any devices.
Is it safe to delete DriverStore folder?
If you delete all of the DriverStore folder contents on your Windows PC, this action will lead to errors, crashes, etc. In most severe cases, it could potentially render your system or the associated hardware inoperable. So basically you need to know what you are deleting. As a precautionary measure, we strongly recommend creating a restore point first before deleting any of the driver files from this folder.
How to cleanup DriverStore folder in Windows 11/10
We can clean DriverStore folder in Windows 11/10 in the following easy ways. We’ll explore this topic under the methods outlined below in this section as follows:
- Using Disk Clean-up – Safest way
- Using Command Prompt
- Using Batch file
- Using DriverStore Explorer.
Let’s take a look at the description of the step-by-step process in relation to each of the methods.
1] Safely clean DriverStore folder using Disk Clean-up
This is the safest, easiest, and straightforward method to clean the DriverStore. The Disk Cleanup Tool can clean up and remove old, unnecessary drivers from your Windows 11/10 computer.
- When you launch the utility, choose the drive you want to clean up.
- Next press Clean up system files.
- Now select Device Driver Packages and any other options you want.
- Press on OK to run the tool.
You can also use Command-line version of Advanced Disk Cleanup Utility.
2] Clean DriverStore folder using Command Prompt
Another route to go to clean DriverStore folder on your Windows11/10 PC is by using Command Prompt.
To clean DriverStore folder on your Windows11/10 PC using Command Prompt, do the following:
Once the command prompt window opens, follow the instructions in this guide on how to uninstall drivers using the command prompt.
3] Clean DriverStore folder using Batch file
To clean DriverStore folder on your Windows11/10 PC by creating a batch file, then run the .bat file, do the following:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type notepad and hit Enter to open Notepad.
- Copy and paste the syntax below into the text editor.
@echo off
for /L %%N in (1,1,600) do (
echo Deleting driver OEM%%N.INF
pnputil /d OEM%%N.INF
)
- Save the file with a name and append the .bat file extension – eg; DScleanup.bat and on the Save as type box select All Files.
To cleanup the DriverStore folder, navigate to the location where you saved the file and run the batch file with admin privilege (right-click the saved file and select Run as Administrator from the context menu).
4] Using DriverStore Explorer
DriverStore Explorer is a freeware that helps you manage, list, add or remove the device drivers installed on your PC easily. It may not be able to delete system-critical drivers – and that is good!
That’s it on the methods to clean the DriverStore folder in Windows 11/10!
How do I uninstall drivers from DriverStore?
Windows users can safely uninstall or delete a driver package from the driver store on the Windows computer in two main ways which are; uninstall drivers using a command prompt or uninstall the driver via Device Manager. For some hardware like the display, you can use the dedicated uninstaller – Display Driver Uninstaller.
Related post: Manage Device Drivers in the Driver Store folder with DriverStore Explorer.