Guide · Windows 11 and 10
How to remove old drivers from the driver store safely
Years of driver updates leave old packages behind in the driver store. They can be removed safely if you back up first and never touch the folder by hand.
What the driver store is
Microsoft describes the driver store as a trusted collection of driver packages that Windows keeps in a secure location on your drive. Only a package that is in the store can be installed on a device. When a driver is installed, Windows first stages it: it copies the whole package, including the INF file and everything the INF references, into the store after checking its signature.
On disk the store is C:\Windows\System32\DriverStore\FileRepository, with one folder per package, named like name.inf_amd64_1a2b3c4d. Windows lists the packages added by installers as third-party packages, published as oem1.inf, oem2.inf and so on. Drivers that ship with Windows are in the store too, but they are not part of this cleanup.
Why it grows
When you install a newer driver, Windows adds the new package and normally keeps the old one, so you can roll back and so a device can be set up again without a download. After years of graphics, audio, network and chipset updates, the store can hold many superseded versions. Graphics driver packages are usually the largest, often hundreds of megabytes each. Removing the old ones typically frees from a few hundred megabytes to a few gigabytes. It does not make the PC faster, and it means you can no longer roll back to those versions.
What never to delete
- Anything inside FileRepository, by hand. Microsoft's guidance is that files staged in the store should not be removed or modified outside the staging process. Deleting folders in Explorer can leave Windows with a driver entry whose files are gone.
- The package a device uses right now. That includes your display, storage, network and chipset drivers, and anything marked as the installed version.
- The only copy of a driver you cannot download again, such as one for old hardware. Back it up first.
- Windows' own packages. They are not listed as third-party packages and should be left alone.
Avoid driver cleaner tools that remove every old package at once, and avoid /force in the commands below unless you have a backup and a reason. A forced deletion can remove a driver that a device still needs.
The built-in way: Disk Cleanup
On many PCs, Disk Cleanup offers the safest route. Run Disk Cleanup as administrator, choose the system drive, tick Device driver packages if it is listed, and confirm. Windows decides which packages are no longer needed and keeps the ones in use.
Choose the packages yourself with PnPUtil
- Open Terminal (Admin) and run
pnputil /enum-drivers. It lists each third-party package with its Published Name (oem12.inf), Original Name, provider, class, version and date. - Look for the same Original Name and provider listed more than once. Within each group, the highest version and newest date is normally the one in use. Confirm in Device Manager (device Properties, Driver tab) that the version matches.
- Back up each package you plan to remove:
pnputil /export-driver oem12.inf D:\DriverBackup. To back up everything, use*in place of the name. - Delete:
pnputil /delete-driver oem12.inf. Without/forceWindows will not remove a package that a device is still using, which is the behaviour you want.
To put a package back, run pnputil /add-driver "D:\DriverBackup\*.inf" /subdirs /install. Windows will use the restored driver only if it ranks better than the one already installed.
PnPUtil needs an administrator terminal and the /enum-drivers, /export-driver and /delete-driver commands need Windows 10 version 1607 or later. See also how to back up all your drivers.
After the cleanup
Restart, then open Device Manager and check for new yellow marks. If one appears, its error code explains why, and the backup you made lets you restore the package. Keep the backup folder until you are sure everything works.
In Cosmo Cleaner
Release 1.2.0 adds a Drivers tab with a Driver store view. It lists every package, marks the superseded ones whose newer version is installed, and shows how much each would free; the exact size appears when Cosmo Cleaner runs as administrator. The Only superseded switch hides everything else, and one button selects all removable packages.
When you remove packages, Cosmo Cleaner exports each one to a backup first, then removes it, and you can put it back from Vault and undo. Only third-party oemNN.inf packages can be removed, and a package that a device uses is skipped and noted in the log. A Back up all drivers button and a Restore from backup button sit beside it. In AutoBeast, superseded drivers are a plan item that needs your tick and is never run unattended.
Questions
Is it safe to delete old drivers from the driver store?
It is safe when Windows or a tool that checks for use does it, and you back up first. Deleting folders from FileRepository by hand is not safe, because Windows expects staged files to stay as they are.
What is the FileRepository folder?
It is the folder inside DriverStore where Windows keeps the staged driver packages. Each package has its own subfolder, and Windows installs devices from these copies.
Will removing old drivers stop me rolling back?
Yes, for the versions you remove. The device keeps using its current driver, but Roll Back Driver can only return to a version that is still in the store, so keep a backup of anything you may need.
How much space will I get back?
It depends on how many updates you have installed. Typically a few hundred megabytes to a few gigabytes, mostly from old graphics driver packages. It does not speed up the PC.