This article will explain DriverStore and FileRepository folders and how to perform FileRepository cleanup in Windows 10 and 11.
When running a third-party app for cleaning the system drive, you might notice that the DriverStore and FileRepository folders take up several gigabytes of space on your drive. You may reasonably ask: is it safe to run DriverStore FileRepository cleanup? Can I delete DriverStore and FileRepository in Windows 10 or 11? And if so, how to properly clean the FileRepository directory?
Tip. We have a dedicated article that provides an in-depth explanation of how to clean drive C in Windows 10 and 11. Be sure to check it if you want to reclaim some space on the system disk.
What are FileRepository and DriverStore Folders in Windows 10 and 11?
The FileRepository folder within the DriverStore directory is a place where Windows keeps copies of various drivers for various devices. Windows can install those drivers without Administrator privileges when necessary.
One important aspect of the FileRepository folder is that it does not contain the drivers currently in use. They are older versions for a driver rollback, drivers for the devices you used earlier, etc. In other words, the software you replaced with a newer version or driver for the hardware you do not use anymore. Windows will not delete the drivers it does not need anymore to ensure you can use the previously disconnected hardware at any given moment.
The more you use your computer, and the more driver updates you install, the bigger the FileRepository folder becomes. Windows just keeps on backing up old drivers, thus further increasing the size of the DriverStore and FileRepository folders. Not good, especially if you have a computer with a smaller drive. In such a case, FileRepository cleanup and deleting the DriverStore folder becomes a mandatory task.
DriverStore FileRepository Cleanup
We do not recommend deleting the FileRepository folder and its contents altogether. Do not try to Shift+Delete the FileRepository folder. If you need to free space on the system drive, try using system utilities for the disk cleanup. If the FileRepository folder gets insanely large (10GB and more) and you cannot reclaim the lost storage using other methods, proceed with the following steps:
- On Windows 11, press Win + X and select Windows Terminal (Admin).
- On Windows 10, launch Command Prompt with elevated privileges (Run as Administrator). To do so, press Win + R and type cmd, then press Ctrl + Shift + Enter. Note that you will have to enter the Administrator password if your profile operates in user mode and has no Administrator privileges.
- Enter the following command:
pnputil.exe /e > C:\Drivers.txt
That command will generate a list of all the drivers Windows stores in the FileRepository folder.
- Open the Drivers.txt file and note the oemXX.inf strings. You need those numbers to remove unnecessary drivers from the FileRepository cleanup.
- Go back to Windows Terminal or Command Prompt and enter the following command:
pnputil.exe /d oemXX.inf
Replace XX with the numbers of the driver to delete.
- Repeat this step for all the drivers you want to remove.
Removing old GPU drivers is the best option to begin. GPU drivers are the heaviest among other drivers and they are the most common drivers users care to update. Oftentimes, each GPU driver version takes more than half of a gigabyte.
Important. The golden rule of using a modern computer and maintaining its working state is to never delete something you do not understand. Delete only the drivers you can recognize, such as GPU, audio, peripherals, etc. Do not remove unknown drivers.
How to Manually Delete the DriverStore FileRepository Folders?
Some blogs might recommend you perform the DriverStore FileRepository cleanup manually. In other words, Shift + Delete those folders. We strongly advise against that to prevent potential Windows stability issues that may happen after changing owners and permissions for the DriverStore and FileRepository folders.
Using the method described in this article might look tedious at first, but that is the only proper way to delete the DriverStore and FileRepository folders.