Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • 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
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • 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
  • PowerShell
  • Linux

 Windows OS Hub / Windows 10 / How to Completely Remove/Uninstall a Driver in Windows

August 14, 2023

How to Completely Remove/Uninstall a Driver in Windows

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).

Contents:
  • How to Completely Remove a Print Driver from Windows
  • Using Device Manager to Uninstall Drivers in Windows
  • Remove the Device Driver Using the Windows Command Prompt

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.

  1. 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 );
  2. Go to Print Manager -> Print Servers -> your computer -> Drivers;
  3. All installed printer drivers are listed here. Click on the driver you want to uninstall and select Remove driver package; Remove printer driver package in Windows

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.

Uninstall printer driver package

You can use the Remove-PrinterDriver cmdlet from the built-in printer management PowerShell module to remove a specific driver:

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:

  1. Open the Device Manager console (devmgmt.msc);
  2. Go to the View section and enable the Show hidden device option; Show hidden devices in Device Manager
    This mode allows you to remove hidden (ghost) network adapters.
  3. Now find your device in the list, right-click on it, and select Uninstall device; Uninstall device in Device Manager
    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.
  4. 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. Completely delete driver from Windows

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

cmd: list installed driver in drivestoreon Windows with DISM

You can get a list of devices with drivers installed that are not currently connected to your computer by using another command:

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

Before you do this, you can make a backup of all the drivers you have installed in Windows.

For example,

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

You can use PowerShell to view a complete list of installed drivers (including system drivers):

Get-WmiObject Win32_PnPSignedDriver | select DeviceName,InfName

PowerShell - list drivers - Get-WmiObject Win32_PnPSignedDriver

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

You must use DISM to uninstall the driver. If you try to remove a driver in an offline Windows image from a WinPE environment using PnpUtil.exe, you will get an error:

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>

You can also use DISM to add drivers to the Windows ISO/WIM installation image.
3 comments
3
Facebook Twitter Google + Pinterest
PowerShellQuestions and AnswersWindows 10Windows 11Windows Server 2019
previous post
Monitoring Domain Name Expiration Date with Zabbix
next post
Allow Anonymous Access to Shared Folder or Printer on Windows

Related Reading

How to Restore Deleted EFI System Partition in...

March 11, 2024

How to Allow Multiple RDP Sessions on Windows...

March 15, 2024

How to Run Program without Admin Privileges and...

June 8, 2023

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

March 15, 2024

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

March 17, 2024

Refresh AD Groups Membership without Reboot/Logoff

March 15, 2024

Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

March 17, 2024

How to Delete Old User Profiles in Windows

March 15, 2024

3 comments

Sezai Arıkan December 9, 2023 - 11:01 am

Thanks mate

Reply
JC January 28, 2024 - 2:35 am

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!

Reply
RandomGuyOnTheInternetThatWantedToThank September 19, 2024 - 5:54 am

Thank you

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

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Delete Old User Profiles in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • Adding Drivers into VMWare ESXi Installation Image
Footer Logo

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


Back To Top