Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / How to Remove Old (Unused) Drivers from the Windows Driver Store

September 29, 2026

How to Remove Old (Unused) Drivers from the Windows Driver Store

When installing or updating device drivers in Windows, old driver versions remain on the system. This allows the user to roll back to a previous driver version if the new driver is unstable. Because Windows doesn’t automatically remove old and unused driver versions, over time the amount of space occupied by drivers on the system drive becomes quite large.

In this article, we will look at several ways to remove obsolete and old versions of drivers (duplicates) in Windows using built-in and third-party tools.

Contents:
  • How to Safely Clean Up the FileRepository Folder in DriverStore
  • Delete Old Drivers in Windows using the Disk Cleanup Tool
  • How to Find and Remove Old Drivers in Windows with PowerShell
  • Removing Unused Drivers with Driver Store Explorer

How to Safely Clean Up the FileRepository Folder in DriverStore

Windows stores all driver files in its driver repository (Driver Store) located in the %WINDIR%\System32\DriverStore\FileRepository folder.

When installing new device drivers, Windows doesn’t remove old versions from this directory (including during automatic driver updates, which are enabled in Windows by default). The most common cause of a sharp increase the size of the DriverStore is frequent driver updates for NVIDIA and AMD graphics adapters, Realtek sound cards, and other hardware. For example, a single version of a GPU driver can be several gigabytes in size. Therefore, the size of the FileRepository directory can grow to several tens of gigabytes over time.

You can use PowerShell to find out the size of the DriverStore directory ( "{0:N2} GB" -f ((gci –force $Env:windir\System32\DriverStore\FileRepository –Recurse -ErrorAction SilentlyContinue| measure Length -s).sum / 1Gb) ) or graphic tools (for example, WinDirStat).

On my home Windows laptop, the FileRepository directory takes up about 11 GB of disk space and contains over 5,000 files. This directory contains over 20 different versions of the NVIDIA graphics driver.

large size of folder DriverStore

You can safely clean up the contents of the FileRepository folder by removing old and unused driver versions, but this must be done correctly to avoid crashing the system.

Important!

  • Never delete any files from the DriverStore folder manually.
  • Before proceeding with the driver cleanup, backup all the installed third-party drivers to a separate directory using the Export-WindowsDriver PowerShell cmdlet.
  • It is highly recommended to create a system restore point before cleaning device drivers (Checkpoint-Computer -Description "BeforeDriversDelete") or backup your Windows system image.

Delete Old Drivers in Windows using the Disk Cleanup Tool

The safest way to remove old drivers from the Driver Store is to use the Disk Cleanup tool (CleanMgr), which comes built-in to all versions of Windows, including Windows 10 and 11.

  1. Run Disk Cleanup: Win+R -> cleanmgr
  2. Select the system drivedisk cleanup drive c
  3. Click Clean up system files Clean up system files
  4. Check Device driver packages in the listCleanup Device driver packages - Windows 10
  5. Click OK
  6. This cleanup task will remove all previous versions of drivers installed through Windows Update or manually. Only the latest version for each driver will remain in Windows DriverStore. However, you should be aware that the “Roll Back Driver” button in the Driver Properties tab of Device Manager will become inactive. unable to rollback device driver in windows device manager
    The CleanMgr task only removes duplicate driver versions. Unused device drivers should be removed manually.

How to Find and Remove Old Drivers in Windows with PowerShell

Let’s look at how to manually find and remove old driver versions in Windows. You can display a complete list of installed drivers using PowerShell and WMI (CIM) class Win32_PnPSignedDriver:

Get-WmiObject Win32_PnPSignedDriver| select DeviceName, DeviceClass,Manufacturer, DriverVersion, DriverDate,InfName|Out-GridView

In my example, I got an Out-GridView table containing a list of drivers from the Windows Driver Store in the following format: device name, device class, manufacturer, driver version, release date, driver INF file name (oemXXX.inf).

get list of device driver installed in windows driver store

The previous command lists all the available drivers on a computer, including the built-in system drivers from Microsoft. You can list only third-party drivers installed in Windows:

Get-WindowsDriver –Online| select Driver, ClassName, BootCritical, ProviderName, Date, Version, OriginalFileName|Out-GridView

To uninstall a driver in Windows, use the built-in pnputil CLI command. Specify the name of the INF driver file to be removed in the command argument.

pnputil.exe /delete-driver oemxxx.inf

Note. In some cases, the driver can only be removed using the /force (-f) switch:

pnputil /delete-driver oemxxx.inf /uninstall /force

Check the table for drivers with multiple versions, then use the pnputil.exe command to remove all the older versions (identify the old drivers by their version number and/or release date).

Be especially careful with drivers that are critical to the Windows boot process (BootCritical=True).

To make it easier to analyze and find older driver versions, it is convenient to export the list of installed drivers to a text file and import it into Excel:

dism /online /get-drivers /format:table > c:\tmp\drivers.txt

Remove all unnecessary data from the table, leaving only the following columns: system INF driver file name (oemXXX.inf), original INF file name, device class, manufacturer, release date, and driver version. Sort this table by column B (containing the original .INF file name) and column F (driver release date). Among the drivers with the same name, mark for removal all driver versions except the last one. In my case, you can see that most old drivers are referred to the NVIDIA video adapter.

To make it more convenient, let’s create an additional column with the command to uninstall each driver using the simple formula: =CONCATENATE("pnputil.exe -d ";A21)

analyze old drivers list in excel

Run the resulting pnputil commands by copying them into an elevated command prompt or a BAT file.

pnputil Driver package deleted successfully

pnputil.exe –d oem9.inf
Microsoft PnP Utility
Driver package deleted successfully

In my case, I deleted about 40 old versions of drivers from the Windows driver store and cleared about 8 GB of space (mostly due to removing NVIDIA graphics card drivers).

You can use the RemoveOldDuplicateDrivers.ps1 PowerShell script to automatically find device drivers that have multiple driver versions (duplicates) installed (https://github.com/maxbakhub/winposh/blob/main/WindowsDesktopManagement/RemoveOldDuplicateDrivers.ps1 ).

The script will display a list of old driver versions that can be removed once newer driver versions have been installed for these devices. You can check the found oemXXX.inf driver files manually (check the internal driver name in the PublishedName column) and then delete them using the pnputil command. By default, the line with automatic removal actions against found drivers is commented out in the script.

powershell script RemoveOldDuplicateDrivers

Removing Unused Drivers with Driver Store Explorer

A free, small utility called Driver Store Explorer (also known as RAPR) can be used to view the list of installed drivers in Windows. This open-source utility can be downloaded from GitHub (https://github.com/lostindark/DriverStoreExplorer). It is easy to install in Windows using the built-in package manager (WinGet):

winget install lostindark.DriverStoreExplorer

To launch Driver Store Explorer, run the command:

rapr.exe

find old drivers with driver store explorer (rarp)

The tool will display a list of all the drivers that are currently installed. It is convenient that you can sort installed drivers by size by clicking the “Size” column header.

To automatically find and highlight only old driver versions, click the Select Old Drivers button on the right pane. To delete them all at once, click the Delete Drivers button.

Before removing a driver, you can export it to a local folder.

Note that for managing and removing printer drivers, as a large number of print driver versions tend to accumulate over time, it is best to use specialized tools, such as the Print Management snap-in (printmanagement.msc) or the Remove-PrinterDriver PowerShell cmdlet.
16 comments
11
Facebook Twitter Google + Pinterest
PowerShellWindows 10Windows 11Windows Server 2025
previous post
How to Remove (Demote) a Domain Controller in Active Directory
next post
Using Attribute Editor in Active Directory Users and Computers

Related Reading

How to Repair EFI/GPT Bootloader on Windows 10...

March 16, 2024

How to Restore Deleted EFI System Partition in...

July 21, 2026

How to Allow Multiple RDP Sessions on Windows...

April 28, 2026

How to Run Program without Admin Privileges and...

June 8, 2023

How to Install RSAT (Remote Server Administration Tools)...

March 24, 2026

Wi-Fi (Internet) Disconnects After Sleep or Hibernation on...

March 15, 2024

How to Repair Windows Boot Manager, BCD and...

March 11, 2024

Fix: The Computer Restarted Unexpectedly or Encountered an...

May 16, 2024

16 comments

Marko June 13, 2018 - 8:16 pm

great article!!! thanks a million!

Reply
KV January 31, 2019 - 4:30 pm

How did you import from the txt file to excel? Copy and paste just leaves all the info in the first column of cells

Reply
admin February 8, 2019 - 5:19 pm

You shold use “Tab” as a delimeter when importing a txt file to Excel

Reply
Emily Bowman January 26, 2020 - 7:06 am

Note that you cannot copy-paste between regular and administrator windows if UAC is active. You have to retype anyway or use the filesystem to transfer commands (like make a batch file and then run it from admin).

Nvidia and Intel are so aggravating with their massive drivers that never clean up after themselves. Lots of other places they up space around the system, too, like the shader cache.

Reply
John Schindler May 1, 2020 - 5:10 pm

Nice, but the file I want to remove “is not an installed OEM inf”.

Reply
Emily Bowman May 1, 2020 - 7:38 pm

The best way to remove a built-in windows component is with NTLite and reinstall. Once installed, there’s not much you can do.

Reply
Ojo October 25, 2021 - 6:05 pm

Great article. I found so many bad recipes. This was trivial and clearly the correct way.

Reply
Phil September 17, 2022 - 3:59 am

Great except the actual removal command should be:
pnputil /delete-driver oemXXX.inf

Reply
Steve Sybesma March 27, 2023 - 8:25 am

I installed an INF manually by right clicking the INF and clicking Install because the driver wouldn’t install the normal way and it turns out the device is completely incompatible with the driver as there was no change in Device Manager at all.
So in other words, I installed an orphaned driver.
Since the driver does not show in DevManView or when using CleanMgr.exe and checking Device driver packages (0 bytes) I assume this is an exception to your rule and it’s ok to directly delete the two files that have the driver name in them.

Reply
Steve Sybesma March 27, 2023 - 8:27 am

The filename of the driver is android_winusb.inf so it can’t be removed with the pnputil command either.

Reply
Steve Sybesma March 27, 2023 - 8:34 am

I may have a resolution. OEM113.inf is tied to that filename above in the registry. So pnputil may be useful after all. I guess Windows renames the driver to that format because that is not the file I installed. I guess it’s an internal name/external name thing.

Reply
Steve Sybesma March 27, 2023 - 8:42 am

I forgot to add…that I found it with 100% certainty in the registry because the filename in the driver store includes the long guid number or whatever you call it and that appears in the registry entry and that is tied to OEM113.inf
Just learned something today on how this works and how to properly uninstall an INF file.

Reply
Steve Sybesma March 27, 2023 - 8:46 am

Final update: the command “pnputil /delete-driver oem113.inf” worked like a charm!!!
I had my Everything window open showing the two locations of the files in the driver store repository and they disappeared!!!
PERFECT!!!!!!!

Reply
serg December 5, 2023 - 10:15 am

Please condiser improving this PowerShell script to find and remove old and unused device drivers but from any user selected local folder

Reply
Abc October 20, 2024 - 2:20 pm

While this script removed lots of unused drivers, it still leaves a lot of junk, even with the /force switch.
pnputil says the given oemxxx.inf is referred by multiple drivers (even though they are unique).
All of these drivers belong to Intel, most of them to the Intel IGP for which I still have 8 instances.

Unfortunately, DevManView does not help either: It shows only the latest version.

Reply
Jamie January 22, 2025 - 2:02 pm

This script has some potentially serious issues. 1) It incorrectly assumes the date format will be in dd.mm.yyyy which causes the wrong items to be returned for deletion 2) It does not factor in where duplicate devices can share the same inf file 3) It uses the incorrect switch /delete-device instead of /delete-driver.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Backup/Sync to Cloud Storage with Rclone on Windows

    October 9, 2026
  • Fix Missing “Yes” Button in User Account Control Prompt on Windows

    October 7, 2026
  • Block Specific Keyboard Shortcuts with Keyboard Filter on Windows

    October 3, 2026
  • How to Set Task Priority in Windows Task Scheduler

    September 22, 2026
  • AutoStart Program at RDP Logon in Windows RDS

    September 8, 2026
  • How to Convert Windows Machine into a Proxmox VM

    August 30, 2026
  • Enable or Disable Fast User Switching in Windows 11

    August 18, 2026
  • How to Hide Wi-Fi Network in Windows with WLAN Filters (Blacklist and Whitelist)

    August 14, 2026
  • Invalid Signature Detected: Check Secure Boot Policy [Fix]

    August 5, 2026
  • Windows Installer Service Could Not Be Accessed? How to Fix It

    July 28, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • How to Update Trusted Root Certificates in Windows: Manual and Automatic Methods Explained
  • How to Delete Old User Profiles in Windows
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Install RSAT (Remote Server Administration Tools) on Windows
  • Configuring Port Forwarding in Windows
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top