This article describes how to uninstall hardware and printer drivers in Windows 10 and 11. Whenever you connect a new device to your computer, Windows tries to automatically find and download (or update) the appropriate drivers via Windows Update. Over time, this could result in a large number of unused driver files being stored in the C:\Windows\System32\DriverStore
directory.
There are several ways to remove a driver from the Windows driver repository (DriverStore).
How to Completely Remove a Print Driver from Windows
Even if you have removed a printer from Windows using the Control Panel, its driver still remains installed on your computer. To completely uninstall printer drivers in Windows, follow the steps below.
- Open the Print Management Console
printmanagement.msc
(if it’s not installed on your computer, you can install it from RSAT using the command:dism /Online /add-Capability /CapabilityName:Print.Management.Console~~~~0.0.1.0 )
; - Go to Print Manager -> Print Servers -> your computer -> Drivers;
- All installed printer drivers are listed here. Click on the driver you want to uninstall and select Remove driver package;
You can also remove unused drivers from the print server properties. To do this, run the command printui /s /t2
, select the printer driver, then click Remove and select Remove driver and driver package.
Remove-PrinterDriver -Name "HP Universal Printing PCL 6"
Using Device Manager to Uninstall Drivers in Windows
Before uninstalling any driver, you must disconnect any devices that may use it. Once that’s done, you can proceed with the following steps:
- Open the Device Manager console (
devmgmt.msc
); - Go to the View section and enable the Show hidden device option; This mode allows you to remove hidden (ghost) network adapters.
- Now find your device in the list, right-click on it, and select Uninstall device; If there is no driver installed for the device, it will show up in the Device Manager with a yellow exclamation mark. Here are the instructions for finding a driver for an unknown device in Windows.
- To remove both the hardware and the driver from the driver storage, check the option Delete the driver software for this device, then click Uninstall.
Remove the Device Driver Using the Windows Command Prompt
To list the third-party drivers installed in Windows, run the command:
pnputil /enum-drivers
or
dism /online /get-drivers /format:table
pnputil /enum-devices /disconnected
You can also find old and unused drivers (driver versions) in the Windows DriveStore.
This way, you get to see both the INF file name under which the driver is installed in the repository (Published name in oem#.inf
format) and the Original File Name.
Find the required driver in the list and remember the file name (in oem#.inf format). To uninstall the driver, run the following command at a command prompt:
pnputil /delete-driver <Published Name> /uninstall /force
For example,
pnputil /delete-driver oem15.inf /uninstall /force
Get-WmiObject Win32_PnPSignedDriver | select DeviceName,InfName
If you cannot uninstall the driver from the online Windows image, you can try uninstalling it from an offline image.
Boot your computer into the Windows Recovery (WinRE) or WinPE environment. List the drivers in the offline Windows image:
DISM /Image:C:\ /Get-Drivers
Where C:\ is a system partition.
You can uninstall the specific driver from the Win image using DISM:
DISM /Image:C:\ /remove-driver /driver:oem11.inf
Failed to delete driver package: The specified file is not an installed OEM INF.
Or specify the path to the INF file manually::
DISM /Image:C:\ /Remove-Driver /Driver:<inf_file_full_path>
3 comments
Thanks mate
The OEM#.inf’s numbers are just given out sequentially for each computer, so OEM128.inf on one may be OEM156.inf on another. While you can look up the number manually, I needed a way to uninstall this driver ‘blind’ / programatically. The solution I found requires that the source files are still available on the computer. You can then issue this command and your OEM#.inf, whatever that is will be removed from the Driver Store on the computer. Here it is:
pnputil /delete-driver C:\\.inf /uninstall /force
/force uninstalls the driver EVEN IF it is in use by an actual device on the computer.
Thanks for the great article!
Thank you