Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I clean-up these in-use COM ports? enter image description here

The COM port numbers always seem to be taken up by something and although right now I only have 4 serial ports (3 over Bluetooth and one USB to RS-232), I have numerous COM ports set as in use. I'd like to clean that list up a bit.

Also it seems to me that from time to time, one of the taken COM ports gets freed up and then one of the devices I use will take that number creating confusion, since I'll have to go and hunt its com number in device manager.


Well I just cleaned up countless USB devices that once were connected to the computer using USBDeview and still the problem still remains.

share|improve this question

I found a useful answer at How to clear or Reset COM port ?

  1. Click start → Run → type regedit and click OK button
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter
  3. Now on the right panel, you can see the key ComDB. Right-click it and click modify
  4. In value Data section select all and delete reset to zero (0)
    Its 32 bytes with 8 bits in each byte in hexadecimal representation. A bit of value 1 makes a port number (1...256) reserved. The first 8 ports are in the first two hexadecimal values, the next 8 ports are in the second and so on: hex F3 24 would be binary 1111 0011 0010 0100, which means that following ports are used: 1, 2, 5, 6, 7, 8, 10, 15 enter image description here
  5. Close the registry editor and then restart your computer. If you set the value to 0 all COM ports are free.

You may need to reinstall any USB-to-serial converter.

share|improve this answer
Welcome to superuser. I edited your answer and added some more details. Free feel to rollback your post if needed. – nixda Jul 4 '13 at 21:40
Looks interesting! I'll try it out and report the results. – AndrejaKo Jul 4 '13 at 21:44
No, I followed this exactly and it didn't remove any of them. – Bob Brunius Feb 4 '15 at 0:34

Run Device Manager from elevated command line:

> devmgmt.msc

Enable "Show hidden devices" in the menu, and uninstall grayed-out COM ports.

share|improve this answer
The hidden serial ports don't seem the be the main cause of the issue. As expected, I found numerous instances of serial ports created by my USB to RS-232 adapter, but even when they are cleaned up, I still have 11 extra COM ports set as in use. – AndrejaKo Apr 5 '12 at 17:52
@AndrejaKo: Do you have any devices listed under "Modems"? They also take up 1 serial port each. – grawity Apr 5 '12 at 17:54
Yes, but there's just one modem there. – AndrejaKo Apr 5 '12 at 18:02

Resolving USB driver issues

Method Using Elevated Command Prompt

ie type cmd in search bar then right click cmd.exe selecting Run as Administrator

• 1st stage As discussed from command prompt type; set devmgr_show_non_present_devices=1 devmgmt.msc

    Under Ports (Com & LPT) delete all instances of  prolific USB to Serial Comm Port

• 2nd Stage Again from Elevated Command Prompt - Remove Driver Packages from drivers store. The driver store is a protected area of the computer that contains device driver packages that have been approved for installation on the computer

    You need to Identify OEM#.inf  where # is a number so type 
        pnputil.exe -e      (then enter)

    Read the entries in the output to find the description of your package(s) and its file name(s)

    Its highly likely you will have multiple entries from previous attempts.

Note all oem###.inf instances of the prolific driver where # (hash) is the number.

    To remove entries type:
        pnputil.exe -d  oem###.inf

(use space between exe & - and d & Oem then press enter) Remember to replace # with the number of the inf file you want to delete.

If the computer reports that the driver package is in use by a currently installed device, then you must either uninstall the device first, or use the -f on the pnputil command to force deletion of the package.

Also you may have driver package loaded on as program that may need removal using control panel/programs/uninstall a program.

If you do all that before loading the correct driver package and try to keep the Com device inserted in the same port rather than moving it around your ports you will have fewer problems with the Prolific driver.

share|improve this answer

Thanks for all the advice above. I wrote software to automatically clean up the Registry but though it did adjust the Hardware, Software, and Arbiter sections it did NOT remove the phantom COM port entries. Even a reboot with the "USB to 2Serial Port" device removed did not clean up the system properly.

However, the instructions on this PDF did work correctly:

For Win7, I adjusted the instructions slightly on that PDF to be:

  1. click Start / (right click:) Computer / Properties / Advanced System Settings (not Device Manager)
  2. Click Environment Variables
  3. Click in the System variables (bottom section) click New
    Enter Variable Value: 1
  5. Click OK (exits Environment)
  6. Click OK (exits System Properties)

  7. Click Start. In the command box, type Manage This shows the Computer Management window ...

  8. Click Device Manager
  9. Click View and select Show Hidden Devices
  10. Click Ports (COM & LPT)
    Now all the ports, real (black text) and phantom (grayed out text) appear.
  11. One by one, right click the phantom ports, and select Uninstall

This should now have cleared out your system of unwanted phantom USB ports.

Note: after cleaning out all my phantom ports, leaving only "COM1", I find my Registry shows:

Hardware:   COM1
Software:   COM1, COM2, COM3, COM4, COM5
Arbiter:    COM1, COM2, COM3

And a right click on Computer / Properties / Device Manager / Ports shows only COM1. Right click on COM1 / Properties / Port Settings / Advanced shows COM1 with COM2 "in use" and COM3 "in use". All the other settings up to 7 that used to be "in use" are now freed up. So only the "Arbiter" setting seems to be telling the Win7 system what is really "in use". The Computer Management system has cleaned up the Arbiter, but not cleaned up the Software section...

... many are the mysteries of Microsoft...

share|improve this answer
This submission has far to many formatting errors for my taste. Feel free to spend some time formatting your submission and I will reverse my vote. – Ramhound Oct 13 '15 at 16:30
surprised that this answer doesn't have upvotes, as it is the only answer that actually solved my problem on Win7 – bas Jan 8 at 9:27

I found the other solutions presented here did NOT work for me but I found a solution that DID work, here:

Here are the details:
- open Command Prompt (Start > Run) and type: cmd
- at the "C:...>" prompt type: set devmgr_show_nonpresent_devices=1
- start Device Manager (Computer > Properties > Hardware > Device Manager)
- select menu option View > Show hidden devices
- scroll down to Ports and uninstall any drivers blocking ports

This worked fine under Windows XP but I expect it to work just as well under Windows 7. Good luck.

share|improve this answer
That didn't work either. Just saying. The bogus ports still didn't show up – Bob Brunius Feb 4 '15 at 0:43

I have a simple solution that worked for me... my count was up to 45 com ports in use!

1) Open Device Manager

2) From the View menu, select 'Show Hidden Devices'

3) Expand 'Ports (COM & LPT)' category from the list

4) Right-click on all the devices and remove them (no need to tick to delete the driver)

5) From the Action menu, select 'Scan for New Devices'

6) Viola! All the actual devices will be re-allocated from COM1

share|improve this answer
voila not viola – Jason S Jun 9 at 20:51

These did not work for me. But official Microsoft help page worked for me.


  • In the Printers folder, click Server Properties on the File menu.
  • Click the Ports tab, click the port you want to remove, click Delete Port, and then click OK.
share|improve this answer
Does this actually work for serial ports, on Windows 7? Also, you're supposed to summarize the link contents in your answer, instead of just providing the link, in case link rot happens. – AndrejaKo Jun 14 at 13:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.