How to remove all drivers from a laptop. How to completely remove a driver from a Windows system


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 disks 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 capacity 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 place 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 - clearing %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.), demolishing 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, in the sense of 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 preinstalled and third party drivers. The operating system supports this collection in 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 ( did not 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 this 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; there’s a project on codeplex 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 - no, because pnputil says about the driver something like the following - who made it, when, version and name 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 googling 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) a 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 a full life since then, in the sense that I have not noticed 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

Often when Windows transfer from car to car ( virtual machine) there are many hardware drivers left in the operating system that are actually no longer involved in the operation, but can serve as interference. Let's figure out how to identify unused equipment, and how to remove these devices and their drivers?

How to identify unused equipment?

By default, in Windows, the option responsible for displaying unused devices in the Task Manager is disabled. There are 2 ways to enable display of hidden equipment. Which one to choose is up to you.

Note. All the above actions must be done with Administrator rights. It is also worth noting that in this case the main thing is not to remove unnecessary things) Otherwise, the system may simply not boot. This especially applies to drivers and hard drive controller devices.

Enable display of unused Windows hardware via GUI

  1. Press the keys Windows + Break/Pause. (Either in " Control panels" select the item " System")
  2. In the window that opens " System"select item" Additional system properties".
  3. In the window that opens " Properties of the system"on tab" Additionally" at the very bottom click the button " Environment Variables" .
  4. In the window that opens " Environment Variables" in field " System Variables" To create a new variable, you must click the " Create…"
  5. In the additional window that appears " New system variable" specify the name and value of the variable .
  6. Ok-ok-ok.)))

Enabling the display of unused Windows hardware via the command line

  1. start -> run (Or click Windows keys+ R) -> cmd -> OK
  2. Enter Set devmgr_show_nonpresent_devices=1 , Press Enter

Note. IN in this case After reboot this option will be disabled. As opposed to setting a variable through the GUI.

How to remove drivers for unused hardware?

The option to show hidden devices has been enabled, let's now look at the devices themselves and remove unnecessary ones. To do this, open Device Manager Start -> Run -> Devmgmt.msc -> OK. For devices to appear in the "Device Manager", you need to go to the " View"select item" Show hidden devices ". Now, if you open any item in the tree (which presumably contains unused devices), they will have grayed out icons or icons with yellow exclamation mark. Selecting the device right click mouse, you can select " Delete". After confirmation with the OK button, a reboot may be required.

Original article from Microsoft: http://support.microsoft.com/kb/315539/ru

Best regards, McSim!

As you know, quite often many users computer systems are faced with the problem of removing old or unused device drivers. This can be due to many reasons, including hardware conflicts and malfunctioning devices. This also includes installing more recent versions of drivers. This is where a logical question arises: how to remove the driver of a particular device?

What is a driver

Before you begin the process of removing a driver or updating it, you need to know what it is. Essentially this is small program, providing communication between the “iron” component and operating system, without which the device itself will not only not work, but the system may not even recognize it.

In some cases (especially when automatic system updates are enabled), it becomes necessary to change the driver version to a newer one.

View information about driver versions and files

Now a few words about what needs to be done before proceeding with the removal operation. First, you need to find out the driver version (especially when it was downloaded from the official website of the equipment manufacturer). It is very likely that the system has the most latest version, and this is not the reason for the conflict or equipment malfunction. Then the problem of how to remove the driver will disappear by itself. There are several ways to do this.

For example, for Plug & Play devices or standard system components, you can use the DirectX dialog call (dxdiag command in the Run menu). True, here you can see the versions of the screen drivers, audio equipment and I/O devices (unless something else is installed).

However, in the question of how to view information and how to remove a driver, it is better to use standard Windows OS tools. In addition, this is the simplest and most proven method.

Removing drivers using standard Windows tools

In this case, you need to use the Control Panel menu, in which you select the “Device Manager” item. The name may change depending on the version of the installed operating system. Now just select the device you are interested in and call up the context menu, then use the “Properties” command. It will be there Full description driver version ("Driver" tab, "Properties" menu).

Now let's look at an example, say, how to remove an audio driver (or how to remove a printer driver). In principle, the formulation of the question does not matter, the scheme is the same. We carry out the procedures described above, but only instead of the “Properties” button we use the “Delete” button. The system will ask you to confirm the deletion, after which you can restart the computer.

If the printer drivers are standard and included in installation package Windows OS, after reboot they will be installed automatically. Otherwise you will have to install them either with original disc, or download from the manufacturer’s official website.

By the way, this method of viewing information about drivers is also convenient because here you can even find out the location of the files themselves. If for some reason the system cannot remove such programs, you can begin to resolve the issue of how to completely remove the driver in manual mode. To do this, you just need to delete files from specified by the system locations, as well as the corresponding registry keys. However, this is highly discouraged for inexperienced users.

Third party software

Today there are quite a lot of programs that can solve the problem of how to remove old drivers, automatic mode. One of these is Driver Sweeper.

This software has a lot of customization options, for example, filtering by equipment manufacturer, etc. But it is better to check the names of all manufacturers when starting, and then begin the process of analysis and cleaning. It will take a few minutes and will provide a report about outdated or unused (unnecessary) drivers on the system. The latter, by the way, can cause conflicts in the operation of the equipment, since the system itself alternately accesses one or another driver.

Don't be surprised if the program even finds drivers for integrated video cards or sound chips. Next, you need to click the “Cleanup” button, after which everything that the application found will be deleted.

Of course, an inexperienced user can do such things only at his own peril and risk, but, as practice shows, this program works absolutely correctly, does not cause crashes in the operating system and does not interfere with the operation of software and hardware components.

Automatic update

Among programs of this type we can highlight special utilities, intended for automatic update all drivers available in the system. The question of how to remove a driver does not arise here for one simple reason. The fact is that many programs are capable of removing old ones automatically before installing new versions of drivers. But most of them are like this software packages are paid. But the advantage of their work is that they apply directly to the equipment manufacturers’ websites for updates, so that absolutely all drivers will have the correct digital signatures upon completion of installation or update.

Hello dear visitors! I decided to write a short but useful note and tell you how to remove the driver. The computer is an unpredictable thing, so anything can come in handy, even removing the driver specific device. For what? But different things happen, perhaps the driver was installed crookedly, or not exactly the one you need. But it’s not always possible to install a new one over the old one, so you can remove the device driver and install a new one.

After uninstalling and rebooting, the system should find the new device whose driver you removed and offer to install it for it new driver. Perhaps you have another reason why you need to carry out such a procedure. In fact, everything is very simple, now you will see for yourself.

We will remove the driver through the device manager, it seems to me that this is the only correct and reliable way. But still, you should understand that this is dangerous, next to the “Delete” button it even says “Removing drivers (for experienced)”, I think that this was written for a reason. Well, it’s okay, we’re experienced :).

First we need to launch the task manager. To do this, right-click on the icon "My computer" and select “Properties”. A window will open in which on the left click "Device Manager".

In Device Manager, select the device whose driver you want to remove, right-click on it and select “Properties”.

A warning about driver removal will appear. If any programs were installed with this driver, you can check the box next to “Uninstall driver programs for this device” and click the “Ok” button.

Specialized software that acts as an intermediate link in communication between the operating system and internal or peripheral hardware components is called a driver. Receiving a command from the OS, drivers convert it into understandable specific device a set of instructions, and having received an execution report, they broadcast it back. Changes in hardware configuration or incorrect work may be the reason why you need to remove drivers. Let's consider the options provided to the user to perform this operation.

The manufacturer can update the device instructions, and the OS developer can introduce new functions. As a result, the driver, like any software, becomes outdated over time. The user, receiving automatic updates, does not even notice how the replacement occurs. The ideal picture of interaction is spoiled due to the fact that the system “neatly” stores rather than removes unnecessary items. Microsoft has put the solution to this problem in the hands of the user.

Windows 7

There are no special tools for removing old drivers. However, the user has this option. Let's go to the control panel.

The item marked in the screenshot opens a menu for managing installed software and system components. Device drivers fall into the second category.

You can make your search easier by sorting by publisher. When you know the manufacturer of a device you no longer need, you can find it and mark it in the drop-down list. The system will only leave the software released by it in the window.

Once you have decided on the components, you can begin removing drivers from Windows systems 7. By using the indicated button, you will receive a warning about the consequences of your actions.

Confirming our decision, we pass the “last line of defense.” The selected component will be removed and the corresponding device will no longer be available for use.

Windows 10

In the latest version of the OS, Microsoft took a step towards users and provided special tools that allow you to remove unnecessary drivers in Windows 10. They are located in the disk cleanup menu.

Having opened it, select the marked item that allows you to work with system files.

After the components are checked for relevance, we will receive the following window. As you can see, the system is unable to remove unnecessary drivers itself, but it can detect outdated versions and prompt the user to get rid of them.

Removing devices

We have dealt with unnecessary and outdated software. However, the situation may develop such that, if there is current versions software the device fails hopelessly. In some cases, to ensure correct operation new, the old must be completely removed from the system. Let's go back to the control panel.

Select the marked item and go to the PC device management menu.

Here everything is grouped by application area. Accordingly, you can find and remove the driver for a device that is no longer needed or does not work correctly. Let's choose a “victim” and see what needs to be done in this case. Let's try, for example, to remove the sound card driver.

Expand the group of devices and select the one to be deactivated. Calling context menu and find the item that allows you to delete it. The system will display a warning dialog box.

We put a tick in the indicated place and confirm our choice. As a result, the device will be completely removed from the list of used equipment, and the system will clear the software that controls it.

Command line

In particularly advanced cases, you can remove the driver from a computer running Windows 7 or 10 using command line. For example, when the device is no longer there, and the described methods fail to get rid of the components that control it. This method is officially documented by Microsoft and is allowed for use by users with administrative rights. Using it, you can completely remove the driver from the system.

Windows, taking care of users, saves “memory” of all devices connected to the computer. Drivers are placed in a special storage and await their time, which will come when reuse. First, let's create a list of components sent for storage that is easy to study.

Using the above command, we will force the PnP service to save the list of drivers in text file and place it on the user's desktop. The user can now view it in Notepad to find the component to remove.

Let's continue to fight the PC audio system and look at how to remove sound driver, found in the list. Now that we know his name published in the system, we will again use the command line in administrator mode.

The screenshot shows what to do if the OS refuses to uninstall, citing device usage. Add the “-f” parameter, which means executing the command in forcibly and achieve the desired result.

Third party software

When Microsoft does not want or forgets to give the user a tool to perform any actions, this niche is immediately occupied by third-party software manufacturers. In our case we're talking about about programs for removing drivers or updating them automatically. There are many of them released, so we’ll focus on three that are quite popular among users.

Driver Sweeper

It is distributed free of charge and supports one and a half dozen languages, including Russian.

As you can see in the screenshot, latest version released in 2011. It’s not even worth talking about the relevance of the device database. Having launched Driver Sweeper, we select manufacturers known to the program and start analyzing the system.

As a result of a short search, we get a list of drivers suggested for removal.

When you try to run an update for which a notification appears in top line, we get to home page the next “candidate” is Treexy Driver Fusion.

Treexy Driver Fusion

This interesting behavior that we encountered forces us to check the version and license agreement after installing the program.

The version is new, but the “Okay” button is confusing. Let's see what this software offers us by examining the settings.

Almost all the checked search points for “drivers” lead nowhere. At the same time, they openly and intrusively point out to us the limitations of the free version.

The painful impression of the capabilities of this program leads to the idea that the experience that the developers are talking about will be directly related to installing Windows.

Driver Genius

Manufacturer Driver Genius The Russian language does not spoil us. The interface in the latest version of the software is entirely in English.

Suggestions for cleaning the disk from “incorrect” drivers boil down to scanning the storage. We created a list of its contents on the command line.

As a result of the program’s actions, we are asked to free up “as much as” nine megabytes of disk space.

Finally

The capabilities that Windows provides for working with drivers should be sufficient for the user to perform the operations he has planned. Using third-party software is unlikely to give you more than judicious use of the command line. Therefore, if you do not want to “improve the experience,” you should not interfere with the operation of the OS in radical ways with unpredictable results.







2024 gtavrl.ru.