The DriverStore folder is the safe location of all the drivers installed on your system. Whenever you plug in a new device and install the driver, it will be stored in the DriverStore folder. Usually, this folder doesn’t consume a huge amount of HDD space, but some Windows users are complaining about this problem. If you are also facing the same issue on your system, you can easily delete the particular drivers.
The DriverStore folder is the repository of all the drivers installed on your device. So, in the process of decreasing the overall folder size, if you delete any important driver, your computer may face irreversible errors. So, we strongly recommend you create a restore point containing all your important data on your system. If anything goes wrong, just restore your machine back to this restore point.
How to clean the FileRepository Folder in DriverStore
It is very hard to identify the driver you are trying to remove from the FileRepositry folder. Even if you can identify it, you can’t just straight away delete the drivers from the Driver Store folder using File Explorer. You will be denied access to do so.
Method 1 – Using Command Prompt
You have to use the command prompt terminal to do this. You can also use any other terminal as well.
1. At first, click on the Windows icon and type “cmd“.
2. Then, right-click on the “Command Prompt” and tap on “Run as administrator“.
3. Once the terminal opens up, execute this command and hit Enter to retrieve the list of installed drivers in a simple text file.
dism /online /get-drivers /format:table > C:\drivers.txt
You can now minimize the terminal window.
4. Open the File Explorer on your computer.
5. Then, go to the “C:” drive.
6. After that, double click on the “drivers” text file to access it.
7. You will see the list of drivers with certain parameters like ‘Published Name’, ‘Original File Name’ etc.
8. Now, just find out the driver you want to remove from the list. (You can use the ‘Class Name’, ‘Provider Name’ to identify it more quickly).
9. Just, note down the number in “Published Name” of the particular driver you want to remove.
[Example – Suppose, you want to remove the “prnms009.inf” from the Mircosoft, the published name is – “oem0.inf“. So, “0” is the driver number. ]
Now, maximize the Command Prompt window.
10. Now, paste this command and edit it accordingly and then press the Enter key to remove it from your computer.
pnputil.exe /d oemNN.inf
Replace the “NN” in the command with the number you have noticed before.
Like – The number we have noted before was “0“. So, the command will be –
pnputil.exe /d oem0.inf
The driver will be removed from your computer.
But, if the driver is in use, you will receive an error message. Like this –
Method 2 – Run a script
If you don’t want to remove the drivers one by one, you can easily create a script to remove certain drivers from your system.
1. At first, click on the Windows icon and type “Notepad“.
2. Then, click on the “Notepad” in the search results.
3. When the Notepad opens up, paste these lines.
@echo off for /L %%N in (1,1,600) do ( echo Deleting driver OEM%%N.INF pnputil /d OEM%%N.INF )
4. Then, click on “File” in the menu-bar.
5. After that, tap on the “Save as“.
8. Then, set the ‘File type:’ to “All files“.
9. Name the file as “drivercleanup.bat“. Choose a location and click on “Save“.
Once you are done, close the Notepad screen.
10. Next, go to the location where you have saved the batch file.
11. Then, right-click on the “drivercleanup.bat” and click on “Run as administrator“.
Now, this will run and remove the drivers from the FileRepository folder from 1 to 600 sequentially. If a driver is in use or if there aren’t any drivers that exists, it will be skipped.
Method 3 – Disk Cleanup
The disk cleanup can clean up and remove unnecessary drives from your computer.
1. At first, press Windows+R keys together.
2. Next, type this command and hit Enter.
cleanmgr /low disk
The Disk Cleanup window will be opened.
3. Now, click on the “Drives:” drop-down.
4. Then, choose the “(C:)” drive from the drop-down list.
4. After that, click on “OK“.
Wait a while for your computer to analyze the number of trash files.
5. Now, in the “Files to delete:” section, tick all the boxes one-by-one.
6. After that, click on “OK” to clean up the drive.
7. There will be a prompt asking for your permission to delete the items.
8. Just click on the “Delete files” to remove those files.
This will remove unnecessary drivers from your system.