How to Use the pnputil Command in Windows 11 to Manage, Export, and Delete Device Drivers

In Windows 11, hardware stability and peripheral communication are governed by device drivers stored within a secure operating system cache known as the Driver Store (C:\Windows\System32\DriverStore\FileRepository). Over time, as hardware vendors release firmware updates, graphics patches, and chipset drivers, Windows retains older, superseded driver packages in storage. These obsolete packages consume gigabytes of solid-state storage and can trigger severe system instability, including Blue Screen of Death (BSOD) stop codes (such as DRIVER_IRQL_NOT_LESS_OR_EQUAL) or compatibility blocks during Windows 11 feature updates. While the graphical Device Manager (devmgmt.msc) allows basic rollbacks, systems administrators and IT engineers utilize the native command-line utility pnputil.exe (Plug and Play Utility) to query, stage, export, and surgically delete drivers directly from the Windows Driver Store.

Understanding the Windows Driver Store Architecture and pnputil Capabilities

Every third-party driver installed on Windows 11 receives a sequential published name formatted as oemN.inf (e.g., oem14.inf). Operating directly against these published INF files, pnputil controls driver staging and device bindings. The table below delineates the primary command-line switches available in modern pnputil:

Parameter Switch Operational Function Administrative Purpose Safety & Execution Constraints
/enum-drivers Enumerates all third-party staged driver packages. Inventories installed hardware drivers, versions, and published INF names. Read-only; safe to execute on live production machines.
/enum-devices Lists all physical and virtual hardware devices. Audits connected hardware status, device instance paths, and driver bindings. Can be filtered using /connected or /disconnected.
/add-driver Stages and optionally installs driver packages. Injects driver packages into the Driver Store prior to hardware connection. Accepts wildcards (*.inf) and /subdirs /install flags.
/delete-driver Removes a designated driver from the store. Purges obsolete, duplicate, or crashing driver packages. Requires /uninstall to unbind active devices, and /force to override active locks.
/export-driver Backs up all third-party drivers to a target directory. Creates a portable hardware driver backup before clean Windows installations. Extracts raw INF, CAT, SYS, and DLL files.
/restart-device Reinitializes a hardware device. Restarts a hung network interface or GPU without rebooting Windows. Requires the target Device Instance ID.

Querying and Inspecting Third-Party Drivers

To inspect your current driver inventory, launch an elevated Command Prompt or PowerShell terminal (Run as Administrator).

1. Listing All Staged Drivers

pnputil /enum-drivers

The console outputs structured metadata blocks for each third-party package:

Published Name:     oem24.inf
Original Name:      nvldwu.inf
Provider Name:      NVIDIA
Class Name:         Display adapters
Class GUID:         {4d36e968-e325-11ce-bfc1-08002be10318}
Driver Version:     08/12/2026 32.0.15.6081
Signer Name:        Microsoft Windows Hardware Compatibility Publisher

Note the Published Name (oem24.inf)—this is the unique operating system identifier required for all deletion and inspection operations.

2. Filtering for Connected Devices

To view only devices currently plugged in and communicating over the PCIe, USB, or Thunderbolt buses:

pnputil /enum-devices /connected

To audit devices experiencing hardware errors (analogous to the yellow exclamation mark in Device Manager):

pnputil /enum-devices /problem

Exporting Drivers for Clean Installations and Hardware Backups

Before reinstalling Windows 11 or re-imaging enterprise laptops with bespoke proprietary hardware (such as specialized audio interfaces, RAID controllers, or trackpad digitizers), export all installed third-party drivers into an offline repository.

1. Executing the Full Driver Export

Create a backup destination directory and execute the export command:

mkdir C:\DriverBackup
pnputil /export-driver * C:\DriverBackup

The utility parses the Driver Store, extracts every OEM package along with its cryptographic security catalog (.cat) and binaries, and organizes them into categorized subdirectories. This backup folder can subsequently be imported into Windows PE deployment images (via DISM) or restored on a fresh Windows 11 installation.

Staging and Installing New Drivers via the Command Line

When deploying peripherals across a corporate fleet or setting up automated imaging scripts, administrators can pre-stage driver packages into the Windows Driver Store without launching setup wizards.

1. Staging Drivers Recursively

To add all drivers located in a driver folder and install them immediately for connected matching devices:

pnputil /add-driver "D:\EnterpriseDrivers\*.inf" /subdirs /install

If the hardware is currently connected, Windows binds the newly staged driver and initializes the device instantly. If the hardware is not yet plugged in, the driver remains dormant in the Driver Store, activating automatically the moment the user connects the peripheral.

Deleting Obsolete or Corrupted Driver Packages

When an updated graphics driver or audio update introduces system crashes or memory leaks, attempting to delete the driver via normal means may fail if Windows flags the package as in-use.

1. Safe Deletion of an Inactive Driver

If the driver package is not currently bound to an active piece of hardware:

pnputil /delete-driver oem18.inf

2. Forcefully Uninstalling and Purging an Active Driver

If an active, faulty driver must be removed completely from both the running hardware and the Driver Store:

pnputil /delete-driver oem18.inf /uninstall /force
  • /uninstall: Detaches the driver from any active device instances and rolls the hardware back to a generic Windows fallback driver.
  • /force: Overrides operating system locks and purges the driver package files from FileRepository immediately.

Restarting Devices and Resetting Hardware Stacks

When an external display, Wi-Fi adapter, or USB hub freezes, restarting the hardware via command line avoids a full computer reboot.

1. Locating the Device Instance ID

Find the instance path for the target device:

pnputil /enum-devices /class Net

2. Triggering a Hardware Restart

Copy the Device Instance ID and issue the restart command:

pnputil /restart-device "PCI\VEN_8086&DEV_06F0&SUBSYS_00348086&REV_00\3&11583659&0&A3"

Windows unloads the device driver, cycles power to the PCIe register, and reloads the driver cleanly within seconds.

Troubleshooting Common pnputil Errors

System engineers frequently encounter specific errors when managing driver packages:

  • Error: “The driver package could not be deleted. (0x00000002)”: Ensure you are referencing the published oemN.inf name rather than the original manufacturer name (e.g., nvldwu.inf).
  • Error: “The driver package is currently in use (0x00000020)”: If /delete-driver is rejected because the driver is in-use, append /uninstall /force to unbind the device before removal.
  • Error: “Access is denied”: The pnputil executable requires elevated administrator token privileges. Ensure Command Prompt or PowerShell is launched via Run as Administrator.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.