- Windows keeps copies of drivers old ones that can take up a lot of space.
- There are safe methods (Device administrator, pnputil) and manuals for removing them.
- Permission management and caution are key to avoiding problems when removing drivers.
Removing old drivers stored in the Windows operating system can be a delicate but necessary task when trying to free up space or resolve hardware conflicts . Over time, as you install and update peripherals and devices, Windows accumulates previous driver versions in the C:\Windows\System32\DriverStore\FileRepository folder . While these copies can be useful if you want to roll back a driver, their number can grow rapidly, taking up several gigabytes and slowing down your computer.
Mastering the process of removing outdated drivers is key to keeping your computer running smoothly and preventing potential problems caused by driver version conflicts. However, caution is advised, as deleting the wrong file could affect system stability. Here, we explain step-by-step and comprehensively how to identify and remove obsolete or problematic drivers in Windows without compromising your computer's security.
Why does Windows store old versions of drivers?
Every time you update a driver, Windows keeps a backup of the previous one in the FileRepository folder . There's a good reason for this: if the update doesn't work as expected, you can quickly revert to the previous version. But with successive updates or hardware changes, this repository can fill up with useless files, taking up valuable space, especially on low-capacity SSDs .
Identifying old drivers and their location
Most of these files are located in two main paths:
- C:\Windows\System32\DriverStore\FileRepository: Here are the driver installers ready to be used by Windows.
- C: \ Windows \ System32 \ drivers: Contains the .sys files and other active components of each driver.
To identify which drivers you can safely remove , you first need to know which ones are not in use. Windows provides several ways to obtain a detailed list of all installed drivers and their status.
Recommended methods for removing old drivers in Windows
1. Using Device Manager
This method is the safest and easiest for users who don't want complications:
- Open Device Manager by clicking Windows + X and selecting 'Device Manager'.
- Click on the 'View' menu and activate the option Show hidden devicesThis will reveal devices that are no longer connected but still have drivers installed.
- Find the problematic device or whose driver you want to remove. You can check categories like 'Universal Serial Bus controllers', 'Ports (COM and LPT)', or the specific hardware.
- Right click on the device and choose Uninstall device. Check the 'Delete the driver software for this device' box to also delete the driver.
- Restart the PC to complete the cleaning process.
This procedure removes drivers associated only with the selected devices . If you're looking for a deeper clean or can't find your listed device, there are other, more advanced methods.
2. Manual deletion in the drivers folder
If Device Manager won't let you delete the files, you can act directly in the locations mentioned. This requires extreme caution to avoid deleting drivers in use.
- Accede to C: \ Windows \ System32 \ drivers or to the corresponding folder within FileRepository.
- Locate the problematic driver files (for example, those containing names like ew_usbccgpfilter.sys, hw_cdcacm.sys, hw_quusbmdm.sys, etc.).
- Right click and select 'Delete' to delete the files.
- Restart your PC again. once you have finished the manual cleaning.
Manual deletion should be reserved as a last resort, and only if you are certain which files to delete. There is a risk of damaging the system if essential drivers are removed.
3. Using Command Prompt to Remove Drivers (Advanced)
For more experienced users, there is a powerful alternative via the command line , which allows for a more comprehensive removal of drivers:
- Open the symbol of the system as administrator: Press the Windows key, type 'cmd', right-click and select 'Run as administrator'.
- Change directory with the command:
cd C:\Windows\System32\DriverStore\FileRepository - To list all installed drivers, run:
pnputil.exe /e > C:\drivers.txt
This will create a complete listing in the file C:\drivers.txt. - Analyze the file to identify old drivers you want to remove (usually those that begin with oem and have a number, such as oem23.inf). You can learn more about managing drivers at This advanced guide.
- To remove a specific driver, run:
pnputil.exe /delete-driver oemNN.inf /uninstall /force
Replace 'NN' with the corresponding file number. - Repeat the process for each old driver you want to remove, making sure not to delete any currently used ones.
- If the system indicates that it cannot delete the driver because it is in use, try rebooting into safe mode and repeat the process.
This technique is very effective for cleaning the FileRepository folder and can free up a significant amount of space.
4. Permission Issues: What to do if you can't delete folders or files?
Sometimes, Windows may deny access to certain files or folders, requesting permissions from the SYSTEM user . This is common when trying to delete specific drivers, such as those for some older programs or devices that are no longer in use.
If you receive an "access denied" message when trying to delete a folder , and the security options are grayed out even in safe mode, the folder likely belongs to SYSTEM and cannot be modified through the standard interface. In such cases, you can take ownership of the folder using the command line (with `takeown` or `icacls`), or use specialized third-party tools to force its deletion. However, modifying SYSTEM permissions can carry significant risks , so it should only be done if you understand the implications.
Built-in tools and utilities to free up additional space
Disk Cleanup
In addition to manual cleaning and using Device Manager, Windows includes utilities to remove temporary files and unnecessary components :
- Open the Start menu and search for 'Disk Cleanup'.
- Select the drive you want to analyze and click 'OK'.
- In the next window, select the file categories you want to clean, such as 'Temporary Files' or 'Delivery Optimization Files'.
- Click 'Accept' to start the process.
- In advanced mode, you can throw cleanmgr with special parameters for deeper cleaning:
%systemroot%\system32\cmd.exe /c cleanmgr /sageset:65535 & cleanmgr /sagerun:65535
Using this utility is safe, as it only removes files recommended by Windows and does not affect any drivers in use.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.
