9 Ways to Remove Unused, Old or Hidden Drivers

6. Device Cleanup Tool

The Device Cleanup Tool is a nice and simple program by Uwe Sieber that detects devices that are not currently in use and allows you to remove them. It does this by checking the device for the “Currently, this hardware device is not connected to the computer. (Code 45)” status code. Device Cleanup Tool is portable with separate 32-bit and 64-bit versions, make sure to use the right one.

Device cleanup tool 1

Deleting devices can be done on an individual basis by clicking each device, right clicking, and choosing Remove Device. Multiple devices can be selected with Shift+click or Ctrl+click. If you’re unsure about the device, either leave it or go to the File menu and create a restore point first. The Select all option is definitely not recommended unless you are totally sure all devices can be removed safely.

The last used column should display the last time the device was in use but sometimes just displays the last time it was enumerated on boot, so is not always accurate.

Download Device Cleanup Tool


7. Device Cleanup Tool Command Line Version

This is the command line version of Device Cleanup Tool which will come in useful for advanced users deleting devices from batch files and scripts. It only allows you to delete plug and play devices that are listed as not connected.

Devicecleanupcmd

There are three main ways to remove devices using the command line Device Cleanup Tool. Mass deletion of all devices at once, delete devices that haven’t been used for xx number of days/months/years, or delete by hardware device ID ( * wildcard pattern accepted). A few examples are:

DeviceCleanupCmd * (Remove all devices, advanced users only!)

DeviceCleanupCmd * -m:3m (Remove all devices unused for more than 3 months)

DeviceCleanupCmd HID\vid_* (Remove unused HID devices, usually keyboards, mice, joysticks etc)

DeviceCleanupCmd USBSTOR\* (Remove USB storage devices that are not connected)

A couple of optional arguments are -s to bypass creating a restore point, and -t to test the command only. Hardware IDs are found in the Details tab in the Properties window for the device in Device Manager. Make sure to use the correct 32-bit or 64-bit version for your system.

Download Device Cleanup Tool Command Line


8. DriveCleanup

This is the third tool in our list by Uwe Sieber and unlike above, it’s not a general command line remover for non present devices. Instead, DriveCleanup specifically removes unused USB Hubs, Mass Storage Devices, Disks, CDROMs, Floppies, Storage Volumes, and Windows Portable Devices. It also cleans the registry and removes entries related to those devices.

Drivecleanup

The tool will automatically run the delete and clean when you double click on its icon, so be careful if that’s not what you want. Running from the command line you can supply the -t argument to run a test only.

A number of switches are available if you want to remove specific device types. For example, -f and -c will remove only floppy and CDROM devices, -u will only remove USB mass storage devices. Check the included readme file for the other arguments. Like the other two tools here by Uwe Sieber, run the 32-bit or 64-bit version that matches your system.

Download DriveCleanup


9. Remove Hidden Devices With Windows Device Manager

The built in Windows driver and device management tool, Device Manager, is also able to show and remove hidden devices from the system. It has an added ability the other tools don’t (apart from DDU) which is an option in some cases to delete old or redundant files related to the driver you are removing. The main problem with using Device Manager for this task is it’s not easy to delete multiple devices at once.

Before viewing and editing hidden devices in Device Manager, your system needs to be told to show them. This doesn’t happen by default and a new environment variable needs to be added to Windows first.

1. Right click on the Computer/This PC desktop icon > Properties > Advanced system settings, click the Environment Variables button. Alternatively, press Win/Start, type env into search, and press Enter.

2. Press the upper New button. Enter DEVMGR_SHOW_NONPRESENT_DEVICES as the variable name and 1 as the variable value. Press OK twice.

Devmgr show nonpresent devices

3. Now start Device Manager by right clicking Computer/This PC > Properties > Device Manager. Or type devmgmt.msc into Start or the Run dialog. For convenience, we have created a small batch file that will add the environment variable to the system and run Device Manager automatically. Simply download Set DEVMGR SHOW NONPRESENT DEVICES.bat and double click it.

4. In Device Manager go to the View menu and select Show hidden devices. This will repopulate the main window with a number of extra categories like Digital Media Devices, Non plug and play drivers, Other devices, and storage volume shadow copies.

Device manager hidden devices

5. Now all hidden devices are visible you can go through the categories and look for devices you don’t want. The devices that are not in use will have dimmed icons, simply right click on one and select Uninstall to remove the entry.

Device manager uninstall hidden

Some third party devices such as graphics cards, sound cards, printers, etc, might have an extra option in the uninstall confirmation box. This is a “Delete the driver software for this device” check box. Using it will remove driver files connected with the device in addition to the registry entry.

Device manager delete driver software

If ever you reconnect the device you will likely have to manually reinstall the driver for it. This is a handy option if you want to clean install a different driver later on or you want to uninstall a driver for troubleshooting.

Editor’s Note: Some devices are hidden by Windows and are meant to be hidden. A number of examples are usually in Network connections, Sound devices, System, and Non plug and play. It is recommended you DO NOT automatically select all hidden devices for deletion in any of the above programs. If you are not experienced or sure, only delete the blatantly obvious entries like an old USB storage device or game controllers.

21 Comments - Write a Comment

  1. «G~Lí†çh» 2 years ago
  2. OmniCacciatore 2 years ago
    • Dennis 2 years ago
  3. TammyTech 3 years ago
    • HAL9000 3 years ago
      • justsomeitguy 2 years ago
        • HAL9000 2 years ago
  4. Nizar 4 years ago
  5. Ed 7 years ago
    • HAL9000 7 years ago
  6. Xander 8 years ago
  7. Rod - Australia 12 years ago
  8. Tejaswi 12 years ago
  9. olamoree 12 years ago
    • hal9000 12 years ago
  10. TheRube 12 years ago
  11. xpclient 12 years ago
  12. Dave 12 years ago
    • hal9000 12 years ago
  13. Mr.Kishore 12 years ago
  14. Archer 12 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.