Almost every piece of hardware attached to your Windows computer will show up in Device Manager as an installed device. This includes Graphics cards, CPUs, USB devices, disk drives, network adapters and just about anything else. When the device is first connected to the computer, Windows will pick it up and either install the device driver automatically or you install it yourself from CD or the internet.
After that, it’s not a problem while the device remains connected but can potentially become a problem if you disconnect it. The driver that was installed when the new hardware was connected does not get uninstalled when the hardware is removed. Over time this can leave dozens of driver entries on the system for devices which have long since been removed. Some applications also do the same and install a software driver but don’t remove it when you uninstall the software.
Even if the hardware or software is no longer available, Windows will still look for it on boot. This can lengthen boot time and potentially cause future driver conflicts so it makes sense to remove what is no longer required. As Windows hides them by default, we show you 7 ways to find and remove these old and unused devices from your system. All methods were tested on Windows 7 and 10, make sure to run the programs or Command Prompts as administrator where possible.1. GhostBuster
GhostBuster has been developed with the express intention of allowing for the detection and removal of old, unused or hidden devices. Otherwise known as ghost devices. Both setup installer and portable versions are available which is useful as this is not a tool you use every day, so installation isn’t really necessary.
All unused devices are listed in a light orange color while any in use devices are shown in green. To add devices to the removal list and turn them dark orange right click an entry and click the selected Add option. Note you cannot remove individual entries and can only remove by Device type (Generic USB Hub or System board etc) or Class (all System devices or all Disk drives etc). When ready optionally tick the to create a restore point box and then press the Remove Ghosts button.
2. Nirsoft DevManView
DevManView is an alternative tool to the Windows Device Manager, but it displays a whole lot more useful information. Like all Nirsoft tools, DevManView is small, portable and packs a lot into its small size. Before viewing and removing any devices it’s a good idea to first change a couple of settings so things are easier to see.
Go into the Options menu and enable Mark Connected Devices and Show Non Plug and Play Drivers, then click on the Connected column header to sort the list by which devices are connected and which aren’t. Then click, Shift+click or Ctrl+click to select the required devices and go to File > Uninstall Selected Devices. Devices can be disabled instead of removed for troubleshooting purposes. Command line options are also available, /uninstall and /use_wildcard being the most useful for the purpose of removing unused and hidden devices.
3. Device Remover
In terms of a third party device management application, Device Remover is probably the most advanced and feature rich free program available. Sadly for some reason the program is no longer developed and the official website has disappeared. The last available version is from 2014 so is new enough to work fine for most people. Both portable and installer versions can be downloaded.
During first run you will be asked if you want to let the program run an optimize routine, allowing it should speed up the device detection and enumeration process. Once loaded, devices can be viewed in a tree or list style, selectable from the tabs. To switch to showing only hidden devices click Display Mode on the toolbar and select Show only hidden/detached devices.
From there it’s a simple process of looking through the devices and checking the boxes of any to remove, then click Remove all checked when ready. A device removal warning and confirmation window will appear to give you one last opportunity to back out of the changes. Click Remove all devices when you’re ready or Cancel to go back. Although the device removal procedure is quite simple, Device Remover is a powerful tool so other functions need to be handled with care.
Download Device Remover (Copy of original website served by the Internet Archive)
4. 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.
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 the last time it was enumerated on boot, so is not always accurate.
5. Device Cleanup Tool Command Line Version
This is the command line version of above 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.
There are three main ways to remove devices using the command line 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)
DeviceCleanupCmd * -m:3m (Remove all devices unused for more than 3 months)
DeviceCleanupCmd.exe HID\vid_* (Remove HID devices, usually keyboards, mice, joysticks etc)
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.
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.
The tool will automatically run the delete and clean on double click, 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. Or supply a number of arguments to specifically remove the device types you want. For example, -f and -c will remove only floppy and CDROM devices, the readme lists the other arguments. Like the other two tools here by Uwe Sieber, run the 32-bit or 64-bit version that matches your system.
7. Remove Hidden Devices With Windows Device Manager
The built in Windows driver and device 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 which is an option in some cases to delete old or redundant files related to the driver you are removing. The overriding problem with using Device Manager for this task is it’s not easy to delete multiple devices at once.
Before being able to view and edit 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.
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 which 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 extra categories like floppy drives and controllers, Non plug and play drivers, storage volumes and shadow copies.
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.
Some third party devices such as graphics cards, sound cards, printers etc, will 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. If ever you reconnect the device you will likely have to manually reinstall the driver for it.
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 controller.