When you plug a new mouse, printer, or graphics card into a Windows 11 PC, the operating system automatically installs a driver to make the hardware function. Over several years, your computer’s “Driver Store” becomes bloated with dozens of obsolete, conflicting, or corrupted drivers from hardware you no longer own.
While the Device Manager provides a graphical interface for removing currently connected devices, it hides drivers for devices that are disconnected. To forcefully purge obsolete drivers from the system cache, you must use the pnputil command in the terminal.
In this guide, you will learn how to use the Plug and Play Utility to manage and delete Windows 11 drivers.
Step 1: Open an Elevated Command Prompt
Because you are manipulating low-level system files, you must run these commands as an Administrator.
- Click the Start button.
- Type cmd.
- Right-click on Command Prompt and select Run as administrator.
Step 2: List All Third-Party Drivers
Before you can delete a driver, you must find its “Published Name” within the Windows Driver Store. To generate a list of every third-party driver installed on your machine, type:
pnputil /enum-drivers
Press Return. The terminal will output a massive list. Every driver will have a generic “Published Name” (e.g., oem15.inf), alongside the Original Name (e.g., nvlddmkm.inf for Nvidia), the Provider, the Class, and the Version.
Step 3: Deleting a Corrupted Driver
Suppose your PC is crashing, and the error logs point to an old, corrupted Razer mouse driver. You look through the list generated in Step 2 and find that the Razer driver has been assigned the Published Name oem24.inf.
To permanently delete this driver from the system cache, use the /delete-driver switch:
pnputil /delete-driver oem24.inf
If the device is currently plugged in and using the driver, Windows will block the deletion to prevent the system from crashing. If you want to forcefully rip the driver out while it is in use (which will likely require a hard reboot afterward), append the /force switch:
pnputil /delete-driver oem24.inf /force
Step 4: Exporting Drivers for Backup
The pnputil command is not just for deletion; it is also the best way to back up your drivers before performing a clean install of Windows 11.
If you have an obscure motherboard and do not want to hunt down the network drivers again, you can instruct Windows to copy every active third-party driver into a backup folder.
First, create a folder on your desktop called DriverBackup. Then, run the following command:
pnputil /export-driver * C:\Users\YourUsername\Desktop\DriverBackup
Windows will methodically copy the .inf, .sys, and .cat files for every single device into that folder. After reinstalling Windows, you can point the Device Manager to that folder to instantly restore all your obscure hardware functionality.