• Removing unused drivers in Windows 7. How to remove old USB device drivers from Windows

    Hello everyone, my dear readers!

    Glad to see you again on my blog! Yesterday I changed software for more latest versions and was faced with the fact that sometimes you have to demolish old software. The question immediately arose - how to remove installed drivers? After all, sometimes a simple rollback is not enough. In this article, I will tell you all the ways you can do this safely and without damaging your PC.

    What is this for?

    Sometimes removing drivers is not just desirable, but necessary. If, when updating programs, only a few files are added to them, then with system software the situation is completely different. Manufacturers sometimes completely change the driver structure, for example, for audio devices.

    Especially with the advent of the new DierctX. And in this case, you need to remove all old versions of drivers. This can be done in several ways and programs, which I will discuss below. By the way, this applies not only to hardware of primary importance and a certain OS. This may be needed even on modern Windows 10.

    I want to immediately give an important clarification: do not uninstall if you do not have a new driver. Remember, as soon as you uninstall the software, the operating system will simply stop working with it, or even turn it off altogether. Therefore, it is important to have a new version in advance, or software with which you can find and install it.

    Removing the driver using special software

    The good thing about this option is that everything is done quickly. However, quality program, and even a free one, is quite difficult to find. Driver Sweeper- software that I tried myself. You can download from here. Download and install. After launching on Windows 7, or on any other system, it is advisable that you immediately activate the Russian language. This is done in the Language tab.

    On the left side you need to click " analysis and purification" You will have all the devices for which the OS has drivers, even for the printer. Choose the hardware that needs to be rid of old software. Then click on the button Analysis. The system will display all files that are associated with this device. Also, parts of the registry that are related to it will be shown.

    Then you should click the button Cleaning" Once the process is complete, close the program and restart your PC. This is done on both a desktop computer and a laptop. Only after this you can install new software.

    There is another program that will help you with this. It's called Driver Genius. Download it you can from here. Download, install and run it. A window like this will open.

    As shown in the picture, click Driver Cleanup and select the device. Then click the button " Next" The program itself will remove everything you need, and all you have to do is restart your PC.

    Removal through the operating system device manager

    First you need to open the task manager. Right click on the panel quick launch, on some free space not occupied by shortcuts and in the menu that appears, select the line with this name. You need to end all processes associated with the driver you want to remove. For example, you want to remove the software on your laptop that is responsible for the video card, close all processes related to the image.

    Now you need to go to the control panel and open device Manager. You will see a window like the image below.

    In it, select the desired device, right-click and select the “ driver" Next, click “ Delete».

    The following will appear.

    Check the box where indicated and click " Delete».

    In principle, all this is enough, however, this method does not completely delete all files associated with the device. For example, there will still be entries in the registry. This is not dangerous, but in the future, without cleaning the registry, it can slow down the system.

    Precautions

    Installing new drivers while uninstalling old ones can cause problems. For example, you will remove the driver, but the new one will simply not be installed, causing an error digital signature. This especially happens with software for a printer or scanner. In this case, reboot to safe mode. To do this, restart your machine and click F8, and select the first line.

    Only after loading the operating system in this mode can you begin to take action. In this case, the OS simply disables some functions that block some actions related to confirming the quality of the software. And for new operating systems, installing software without driver signature is simply a potentially dangerous action. Therefore, we have to use this method.

    Conclusion

    At the end of the article, I want to warn you that any operation described here must be carried out to the end. Do not interrupt the process associated with software removal. Otherwise, your system will slow down. The worst thing that can happen is errors in the registry. It will be very difficult to correct them manually, so it is important to complete all procedures. By the way, there is an excellent video on this topic.

    On my own behalf I can recommend you to use special programs. They will not harm the system, and will definitely delete all files associated with drivers. All software is free, I tested it myself. The programs work on all versions and are visible. By the way, some actions may require permissions from the system itself, so it is better to always run the software only as an administrator, otherwise nothing will work.

    With this I say goodbye to you! Hope. my article helped you, share it with your friends on social networks, because they may need help too! Also, subscribe to my blog updates, because I only collect here useful information! All the best to you, I wish you not to meet with computer problems and see you in new articles!

    It happens that you stop using the device. But you should remember that a certain number of files that control it remain in the system. This is part of the driver program. The question arises: is the driver correct?

    The easiest way is to use standard remedy all operating rooms Windows systems- "Device Manager". Simply left-click the device you want to remove from the system, right-click, selecting the menu, and go to “Properties”. Go to the "Driver" tab and select the "Delete" button. After this, remove the device. This is the answer to the question of how to properly remove a driver, but there are also more advanced and convenient methods.

    Now turn off the PC if required to remove the device. But, as already mentioned, that's not all existing options solving the problem, since after this procedure some files still remain in the system, which may result in problems in the future. Therefore, to clean the system from unnecessary drivers, it is advisable to use specialized programs, especially to people whose line of work this is related to - service engineers and system administrators, as well as specialists technical support.

    This will slightly speed up the performance of the system where such software is used. We are talking about an automated mode, so how to completely remove a driver is a matter of the operation of the program algorithm, and it will no longer concern you. It should be noted that one should not expect miracles. Such programs are the same as the benefits that can be obtained by using them are calculated in best case scenario+1-5% to productivity. But still, many people who are interested in tuning the system like such “whistles”, which give the illusion of great benefits.

    To be fair, we must add that many of these programs have much more useful features than from the system. But we will return to this issue later in the article. For now, let's list the most common ones paid programs- Driver Cleaner, Driver Sweeper, Drivertool. It should also be noted free solutions(although the above are also available with sufficient functionality in the shareware version). Acceptable freeware program options include: DriverPack Solution, Drivers Installer Assistant, Drivers Pack Unpacker & Installer, Guru3D Driver Sweeper.

    Let's look at the functionality of the DriverPack Solution program, the code of which is distributed under an Opensource license that provides for publication source code and its modification and use. The developers of this most useful program did not stop at solving the problem of how to remove the driver. This software not only allows you to remove unnecessary drivers from a system on Windows XP/Vista/Seven, but also to find and install them, as well as perform an update by downloading it from the Internet, thus greatly facilitating the installer’s already difficult work.

    Note that there are two versions of this software: Full and Lite. The first is distinguished by the size of the distribution kit, occupying 3 gigabytes. A very useful thing, as it solves problems with identifying and installing drivers in one fell swoop. Just insert the disc and the rest will be done in automatic mode. Drivers will be taken from an extensive database of packages and installed immediately. Let's note a huge number of laptop vendors for which drivers are especially compatible - Lenovo, Toshiba, Dell, Acer, Sony, HP, eMachines and so on. If you wish, you can make amendments to the database and remove a driver that is unnecessary in your opinion, thus changing the considerable size of the distribution kit.

    But why do this if there is a need to constantly have a universal collection of drivers? Just write DriverPack Solution to external hard USB disk and take it with us. And now we don’t have the problem of how to remove or install the driver latest update. It should also be noted that there is Lite versions. If you are absolutely sure of the future presence of a high-quality Internet channel on all machines where you will install drivers, then take this version. All necessary drivers will be downloaded after identifying the equipment, and in the future will be updated automatically.

    Each device, when connected to a computer under Windows control is identified using drivers - software, without which its operation is impossible. During "life" desktop computer or a laptop, dozens, if not hundreds of devices are connected to it. External hard drives, flash drives, scanners, printers, gamepads, keyboards, mice are just some of the accessories that automatically install their drivers on the computer or the user does it manually. This applies not only to devices that are connected externally to the computer, but also to internal components - video cards, hard drives, etc.

    If the operating system is not reinstalled on the computer for several years, full formatting hard drive, hundreds of drivers are stored in the computer’s memory, which are unlikely to be useful to the user. Delete unused drivers easy, and in this article we will tell you how to do it. Before you begin the steps described below, create a file so that you can return to it if problems arise due to deleting unnecessary files.

    How to remove unused drivers

    The privilege to remove drivers from a computer is only available to an administrator, so before you begin the steps below, make sure you have sufficient rights to do so. To clean your computer of unused drivers, do the following:


    Please note: In some versions of the operating system, the display of hidden devices is disabled at the software level. If you encounter a situation where, after checking the specified checkbox hidden devices did not appear, you need to follow the steps described below in the article in a separate paragraph.

    Interesting fact: On your computer, drivers for even one device are stored in several folders. It is quite easy to verify this; you need to unused device right-click and select “Properties”. Next, go to the “Driver” tab and select “Information”. The “Driver Files” column will display dozens of files that are software for just one device.

    What to do if hidden devices do not appear in Device Manager

    As we noted above, there are situations when hidden devices are not displayed in the “Device Manager” even after checking the box (or this item is not in the menu at all). In such a situation, you need to do the following to make them appear:

    1. Launch the “Run” line using the Windows + R key combination and enter the following command in it:
    control.exe /name Microsoft.System
    devmgr_show_nonpresent_devices

    For it to be active by default, in the “Variable value” column you should put the number 1, then click “OK”.

    New variable environment will be created, and hidden options will appear in the “Device Manager” list, the drivers for which can be removed according to the instructions described above.

    One fine (or sad, depending on who you choose) day, I was tired of periodically running out of space on my laptop. Yes, I'm aware that hard drives now they are cheap, but this is not an option for me, because:

    • I have an SSD, but it will still be more expensive than regular HDDs(the volume of my current SSD is 120 gigs)
    • The laptop is working, so the data on it must also be encrypted and all that, so you shouldn’t plug in a home-made device that isn’t approved by your employer.
    • I'm greedy :)
    This topic is probably intended and may be useful to those people who are concerned free space on system disk, the usual cleaning agents have already been tried, but I want to squeeze out a little more (as in the old joke - the first link to the joke that comes up in Google, if the site is bad - sorry).

    In general, I sometimes clean up disk space. Standard Procedures- cleaning %TEMP%, disk cleanup (erases all sorts of error reports buried by the system just in case, all sorts of memory dumps of fallen processes, etc.), demolition of programs that are no longer needed.
    However, as I found out, there are folders that it does not clean nobody(from the word completely). Well, I mean from standard means. And now I want to talk about the %WINDIR%\System32\DriverStore folder.

    If this folder takes up a lot of space for you, and you don’t feel like reading the entire post, please go to the very end, there are links to github, where you can take the finished result of my research and try to squeeze (or squeeze out) a little space from Windows.

    Introduction to the problem - what kind of folder is this, why is it needed, who is to blame, what to do

    If you scour the Internet, you can find that this is the place where the system stores in reserve all the drivers that it has ever come across along the way. Yes, yes, and those that were installed for your video card three years ago are also there, despite the fact that you updated them many, many times.

    Let me give you a little theory from that same MSDN:

    Starting with Windows Vista, the driver store is a trusted collection of inbox and third-party driver packages. The operating system maintains this collection in a secure location on the local hard disk. Only the driver packages in the driver store can be installed for a device.

    When a driver package is copied to the driver store, all of its files are copied. This includes the INF file and all files that are referenced by the INF file. All files that are in the driver package are considered critical to the device installation. The INF file must reference all of the required files for device installation so that they are present in the driver store. If the INF file references a file that is not included in the driver package, the driver package is not copied to the store.

    The process of copying a driver package to the driver store is called staging. A driver package must be staged to the driver store before the package can be used to install any devices. As a result, driver staging and device installation are separate operations.

    A driver package is staged to the driver store by being verified and validated

    In my loose translation it would be something like:

    In Windows Vista and later, the Driver Store is used as a collection of trusted pre-installed and third-party drivers. operating system maintains this collection in a safe place on local disk. Only those drivers that are in the repository can be installed.

    When a driver is copied to the repository, all its files go there, including the .INF file and all the files that that .INF refers to. All files that make up the driver are considered necessary for the operation of the device. The INF file must reference all the files necessary for the device to operate in order for them to all end up in storage. If the .INF file references a file that is not included in the driver, that driver is not copied to the store.

    The process of copying a driver to storage is called staging ( didn’t try to invent a term, left the English word - approx.). In order for a driver to be used for a device, it must go through a staging process, so installing the device and staging the driver are separate operations.

    Before entering the storage, the driver is checked for the validity of the signature and the integrity of the files.

    Is it really that bad and no one will help?

    Looks a little scary to get into with your dirty hands, doesn't it? However, there is a small (and not very convenient) straw from Microsoft, it is called pnputil.exe and can:
    • List drivers that are in staging (but not included in the standard distribution of your Windows, i.e. not integrated into the installation distribution)
    • Add a driver to the repository
    • Remove driver from storage
    Moreover, when uninstalling, it checks whether the driver being removed is not used on at the moment for some connected device, and without the /f option (i.e. /force - force) it refuses to remove such drivers.
    I used this utility.

    It should be mentioned here that I’m not the first smart person to think about this problem; on codeplex there is a project for the GUI application DriverStore Explorer, but it is actually only a graphical wrapper around pnputil and does not analyze drivers in any way, giving complete freedom to its user.
    First of all, I have to search manually outdated versions I wasn’t very keen on drivers, and secondly, I wanted to understand what I would gain from removing this or that driver (in terms of disk space). So there was a full blown syndrome here.
    So I picked up Python and away we go.

    Hurray, let's build our own bike!

    By looking closely, I discovered that in order to find the most recent version, there is enough data from pnputil, but to determine the size - not, because pnputil says about the driver about the following - who made it, when, the version and name of the INF file. He doesn’t say which of the bunch of folders in the DriverStore belongs to this driver.
    Having looked even more closely at the %WINDIR%\Inf folder, I found there the same .INF files (by name) that pnputil lists, and looking at the folders in the DriverStore, I found there... the same .INF files, but with different names - each in a folder from its own driver.
    Surely there is a simpler way, but I went straight ahead - I built a mapping from the name of the .INF file in the pnputil output to the folder in the DriverStore, which contains the same contents .INF file (with a different name). And I took the size of this folder as the size of the driver.

    Now all that was left to do was to wrap it all in scripts for easy execution.
    Along the way, however, there was a setup in the form of UAC - pnputil only worked with administrator rights, which means it was necessary to increase privileges from Python. A quick google yielded several recipes that said something like “you can do it this way, but there will be no output (let alone input), I have no idea how you will debug it,” and that didn’t suit me, so I modified it a little examples.
    True, my implementation is currently not ideal - it will crash when trying to redirect stdout or stderr, because internally I use the Windows console concept, and this does not work for redirected streams...
    But I turned a blind eye to this for now, because to fix it you need to install a slightly more complex mechanism than calling FreeConsole/AttachConsole, i.e. manually redirect all flows.

    Let’s try what’s written in practice

    And now, in fact, the most relish is the results of all this footcloth of the text. You can take it and use it at your own peril and risk, you can try to do good and harm the source code (MIT license, yes). You can even thank me in the comments if these scripts help someone :)

    If you are downloading a binary version (the interpreter is hardwired inside) - take the one that corresponds to the bit depth of the operating system (the 32-bit version on a 64-bit OS will not find pnputil and, accordingly, will not work... if you really need it - write, you can try to get around it).
    If you take script version- similarly, you need to run it with an interpreter with the bit capacity of the operating system.

    I personally tested this on two computers with Windows 7, in theory it should work on Vista and 8. On WinXP it should be (sort of) useless.
    The script will analyze the driver repository and try to find outdated driver versions (i.e. those for which more than one is in staging at the same time) new version) and will offer to delete them, giving an estimate of the space occupied by the drivers (and an estimate of the winnings, of course, too).

    Result on my laptop
    Personally, I managed to squeeze out about 6 gigabytes (!), mainly by removing old versions of NVidia video card drivers.
    On another laptop, everything turned out to be not so rosy, we managed to clear only 200 (in my opinion) megabytes, but there the system lived significantly less than mine and simply did not have time to accumulate many drivers.

    Both laptops have lived since then life to the fullest, in the sense that I did not notice any problems from cleaning.

    If you have read this far, thank you for your attention!

    Afterword

    As expected, it turned out that cleaning scripts do not always work, the main problem is if Windows is not English-speaking (somehow I didn’t think that utility utilities would be localized). This is what I will fix. The bulk of the problems should be fixed, see

    We continue to clean the system of accumulated garbage. Today we will touch on the topic of drivers. In the article, I only showed a little at the end how you can remove drivers. But in the article it was a matter of “firewood” and it was necessary to remove it. There I described in more detail.
    Therefore, if you want to remove or roll back drivers, read one of the articles above. Or better yet, both.

    Now closer to the point. The method described below will help you see and remove all drivers that are on the system and not in use. What kind of firewood is this? Yes, all kinds. These are also those that were installed when you “stuck” some other person’s flash drive once. This includes firewood that was installed along with some program for video or sound processing, as well as antiviruses, etc. software. Subsequently, you have already deleted these programs, but the tails in the form of drivers may remain. Also, this rubbish may remain after an incorrect reinstallation of Windows.

    Now we will delete them in a standard way Windows system.

    Opening System properties. This can be done in three ways:

    1) Win + Break/Pause

    2) RMB on the icon My computer and in context menu choose Properties

    3) Start -> Control Panel -> System

    In Windows 7 and 8 you also need to select on the left Additional options systems


    In this window, click the Create button in the “System variables” field


    Now in this new small window we enter Variable name How devmgr_show_nonpresent_devices, A Meaning there will be 1


    Then click OK everywhere until the System Properties window.

    All that remains is to open this same Manager.
    Or in this very System Properties window, select the tab Equipment:


    Or call and enter Devmgmt.msc or start devmgmt.msc into it


    All. Now you can open the lists and you will see that there are translucent or exclamation point. This is what we need:


    Right-click on them and delete:

    You can also simplify all these actions (before opening the Manager) by entering command line Set devmgr_show_nonpresent_devices=1
    Then you can open the manager, show hidden ones and delete them.
    The thing to keep in mind here is that after a reboot this option will disappear.

    That's all. And as a conclusion I would like to give a few notes:

    1) If it doesn’t work, try doing it as Administrator

    2) If not displayed, click on the "Update hardware configuration" button or restart the Manager

    3) Watch carefully what you delete. If something doesn’t start later, it’s not my fault.

    4) The list does not always show unnecessary ones. Everything that was installed may be present there. Therefore, think again about whether you need to delete it and whether it will definitely no longer be used. Although the firewood will then be reinstalled again, but not for all devices.

    Created based on