There are many entries in the "Devices and Printers" window showing devices which are no longer connected. How can I delete these entries all at once, ideally on the command line?
This picture displays my issue. There are ninety seven devices on the list that were connected sometime in the past but only six of them are currently connected. I can remove them one by one by marking them and then clicking "Remove device" but it isn't possible to mark them all and remove them together.
63 Answers
To remove bluetooth devices I use btpair -u from
To remove usb devices I use removedevices.js (which uses devcon) from
thanks for advices
As the general tool for this job I would use Windows Device Console (devcon.exe) which is kind of a command line version of the Windows device manager.
Download it from Microsoft Support.
You have to play a bit with the command line, you can list devices and remove them from the system.
However there will not be a remove all the ones I don't use anymore switch. You most likely have to list all devices, filter them somehow and then remove them.
It's difficult to give exact instructions, not knowing all the devices you had attached to your system.
You want to be careful not too remove any active devices.
From another user and it works great!...
Open the run box, or search box in the start menu, and type in the following. Shell:PrintersFolder That will bring up what is basically the old printer view and you can highlight multiple devices and delete them. I have no idea why they removed that from the Printers and Devices view. This even works in the Windows 8 Metro interface. You just start typing and it will bring up the app search in Metro. It will then launch the Printers folder on the desktop. If you want a shortcut you can then drag the icon in the address bar at the top of the screen to your desktop or wherever you want it.