Over time on Windows systems, it's inevitable that old device drivers are supplanted by new ones. Even on systems where drivers aren't rigorously maintained, Windows Update will typically update or replace, on average, a dozen drivers annually.
Those who pursue driver currency more vigorously may use tools like the Intel Driver Update utility, GeForce Experience (an Nvidia tool that checks graphics, sound and 3D drivers) or outright driver management tools such as eSupport's DriverAgent or Slimware Utilities’ Driver Update to check and update drivers on their Windows PCs (whether Windows 7, 8 or 10.) The Intel and Nvidia offerings concentrate on devices they make, whereas general-purpose driver update tools like those just mentioned from eSupport and Slimware Utilities check all of them – and point you at drivers in need of updating, with varying degrees of help and support in getting them installed.
What happens when you install a Windows Driver?
Installing a Windows Driver is actually a fascinating process, and involves a lot of behind-the-scenes action in Windows. For this discussion I'm going to stick to so-called Plug and Play (PnP) devices, which are built to announce themselves to Windows so that it can at least assist in finding a device driver to use, if not find the latest and greatest instance of its kind. My information comes courtesy of Mark Russinovich and David Solomon's terrific book Windows Internals (6th edition in two volumes, as of this writing):
- A bus driver informs the PnP manager about a device it discovers during enumeration using a device instance identifier (DIID).
- The PnP manager checks the registry for a corresponding function driver. When it fails to find one, it tells the user-mode PnP manager about that device using its DIID.
- The user-mode PnP manager tried to perform an automatic install without user input or intervention. For those installers that involve posting of dialog boxes that require user input, the PnP manager will execute a Hardware Installation Wizard to oversee such task(s) if the logged-in user has admin privileges. (If not, this activity will be deferred until an admin-level user next logs in.)
- The Hardware Installation Wizard uses Setup and CfgMgr (Configuration Manager) API functions to locate INF files that correspond to drivers that are compatible with the detected device. This might involve accessing the Microsoft device databases to look for such files, or accessing such files from the local file system (or media like a CD or DVD) at the user's direction.
- Installation proceeds in two steps: (1) The third-party driver installer imports a driver package into the driver store, and (2) the OS performs the actual driver installation, using the Drvinst.exe process (the executable for which resides in %SystemRoot%\System32\). As part of that process, .inf and .cat files are deposited in the driver store associated with a DIID that takes the form of oemnnn.inf, where nnn represents a one- to three-digit decimal number
It's important to note that the process documented says nothing about cleaning up older versions of drivers already present in the Windows driver store (in the %SystemRoot%\System32\DriverStore directory). The focus of this article is on investigating the contents of that driver store, and removing older and/or obsolete items to reduce its on-disk footprint.
There's an important downside to consider when removing elements from the driver store. If you remove all drivers except for the most recent one(s), you will not be able to use the Roll back driver option in the Properties window for the related device in Device Manager to revert to an earlier version of the driver, should the current one prove unstable. A more conservative approach to pruning your driver store might therefore be to keep the two most current drivers for any given device, rather than only the most current one. I myself do not follow this approach, except for drivers that are updated frequently or when using a beta driver. When only one driver is present for a device, the Roll Back Driver button is greyed out and inaccessible (see Figure 1).
Getting the lowdown on device drivers in Windows 10
For all modern Windows versions (Vista and newer) there's an excellent tool available to explicitly observe and manage the Windows driver store. The tool comes from CodePlex, Microsoft's free, open source software and source code repository, and it's called DriverStore Explorer (aka RAPR.exe). To forestall inevitable questions, version 0.5 dated December 30, 2012 is indeed the most current version as of this writing, and it works quite well with Windows 10, which it predates by almost three years.
To operate on the driver store, you must run RAPR.exe with administrative privileges (right-click the filename and then select Run as administrator from the resulting pop-up menu). Next, you must enumerate the items in the driver store, which produces a display that looks similar to Figure 2. (Driver Store Explorer will show the drivers present for the devices on your PC rather than for the devices present on the machine whence this screenshot originated, my Surface Pro 3.)
To give you an idea of what can happen to this repository for driver files, I've seen the total item count on this same machine go as high as 112, of which over 30 items were duplicated Intel drivers of one sort or another. If you click on any of the column heads shown in this display, the listing will re-sort itself to match.
When pruning drivers, I usually click on Driver Class and then look for multiple instances of the same driver on a class-by-class basis. To attempt to remove them, one need only click the check box at the left as shown in Figure 2, then click the Delete Package button at the right.
[Related: Are you ready to support Windows 10?]
Here's the good news about working with RAPR: it won't let you delete any drivers that Windows is actually using unless you over-ride the program and use the Force Deletion button explicitly. The only times I've ever used this capability with the program is when multiple sources of good advice have urged removal of a bad or questionable driver so that it can be replaced with a different, working, and older version.
Figure 3 shows a short before and after sequence to illustrate what typical clean-ups involve.
When you consider that drivers for a typical graphics adapter consume between 200 and 400 MB of disk space, and that most devices require at least 2-4 MB at a minimum, getting rid of unwanted entries can really free up some room.
When is Driver Store clean-up action needed?
An old saying on the Internet regarding system optimization and cleaning earns the YMMV acronym (Your Mileage May Vary). It means that different systems will inevitably exhibit different behaviors, values and so forth. With that caveat in mind, take a look at the properties for your DriverStore directory: if it's over 1 GB in size, I'd fire up RAPR and see what it can find; if it's over 2 or 3 GB, you'll definitely want to see what's in there and get rid of what you no longer need or want. I've seen some instances where the folder's size exceeded 4 GB, and read about some cases where it topped 10 GB. Trust me: you don't want to let things go that far.
The worst offenders I've run into include the various Intel chipset update utilities (e.g., the various Intel Chipset Device Software packages, often called "INF Update Utility") and the Nvidia drivers. Intel's tools seem particularly prone to depositing dozens of copies of the same driver in the driver store.
Note: For whatever reason, if you have multiple instances of devices on (or in) your PC, you must indeed have a separate copy of a driver package (oemnnn.inf) for each one – that's why you cannot always remove what might look like unnecessary duplicates of the same driver on a PC. But high counts of the same driver, or worse, high counts of multiple versions of drivers for the same device, usually warrant clean-up.
With Nvidia display drivers typically consuming 400+ MB per copy (or version), keeping older drivers around is quite literally a waste of space. You can keep two versions for safety if you like, but there's no reason to have more than that in the driver store. (Before I started doing regular clean-ups myself, I might find a dozen or more Nvidia display drivers on a PC with a one-to two-year-old OS install running.)
Because you have to work at it to hurt yourself using RAPR, you needn't feel compelled to make a restore point before cleaning up your driver store. But because I'm a "belt-and-suspenders" kind of guy, I've gotten in that habit just in case I accidentally remove something it turns out I really need. You can always reload that restore point from the repair/recovery media for your OS if you wind up with a failing or unbootable machine after a too-aggressive clean-up. Who knows? It could come in handy. With a backup you can clean up whatever you want, whenever you want without fear.