53

I have recently upgraded to Win 10 and hence to vagrant 1.7.4 and virtual box 5.0.2 r102096. While bringing one of the VM up using vagrant up, vagrant kept failing, but created new Host only adapters in the system on every attempt. Now I have 6 virtual host only adapters.

How do I remove the extraneous ones?

Manish Sapariya
  • 3,575
  • 3
  • 25
  • 34

7 Answers7

70

Open "Network connections" right click on the adapter you want delete and select properties. Under Networking -> click on configure. go to Driver tab on the popup and click on uninstall. This will remove it from the list.

Prashant
  • 709
  • 5
  • 3
  • 20
    This is ok for 1 or 2, but I had about 16 of these to remove, so found a quicker way: Open "Device Manager", expand "network adapters" and then right click -> Uninstall each Virtual Box – Scott C Oct 26 '16 at 22:25
  • If you ever use the command from https://stackoverflow.com/a/32093978/2714781 be aware that all of these virtual adapters already removed manually (using e.g. device manager) will come back! – Johannes May 22 '22 at 19:08
56

Vboxmanage to the rescue.

Sample command:

vboxmanage hostonlyif remove "VirtualBox Host-Only Ethernet Adapter #3"
bschlueter
  • 3,817
  • 1
  • 30
  • 48
Manish Sapariya
  • 3,575
  • 3
  • 25
  • 34
  • 5
    Just make sure the virtual adapter is enabled. It won't work if the adapter has been disabled. – pbarney Apr 17 '17 at 16:13
  • 2
    You need to use the name that it shows up as within the Device Manager. Using the name from the Network Connections control panel will result in a 'not found' error. – Wisteso Jul 08 '20 at 21:24
  • @Wisteso 's reply should be part of the answer. – Robert Kerr Dec 22 '20 at 18:59
  • 1
    `2..30 | % {vboxmanage hostonlyif remove "VirtualBox Host-Only Ethernet Adapter #$_" }` For those that have to look up how to loop in powershell, still have to endure UAC prompts... – Amos Baker Jan 23 '23 at 16:08
24

I was also facing the same problem.

I have solved it through the following solution

Go to Device Manager

click on Network Adapter

and then right click on virtual network adapter and uninstall option will come so remove it.

Mudassir Khan
  • 1,714
  • 1
  • 20
  • 25
  • If you ever use the command from stackoverflow.com/a/32093978/2714781 be aware that all of these virtual adapters already removed manually (using e.g. device manager) will come back! So at first try vboxmanage . – Johannes May 22 '22 at 19:10
8

By far the cleanest way is to use VirtualBox to remove the extra adapters.

Had a lot of adapters. You can see this in Virtualbox under Preferences Lots of adapters

Got to delete them one by one. Delete them one by one

This deletes the Virtual Adapter Delete the Virtual Adapter

You can leave the adapters that you want.. or delete them all! Delete whatever you want

thejohnbackes
  • 1,255
  • 11
  • 21
user9382697
  • 81
  • 1
  • 1
  • Adapters could be seen in the virtualbox list if they are enabled if not enabled then not in the list of virtualbox. And also you need to reopen virtualbox after enabled the addapter. – Janis Karklins Nov 15 '18 at 09:09
6

I had the same problem. The vboxmanage command didn't help - I got an error when trying to delete an adapter. So here is my solution.

All you need to do is to delete adapter's subkey from this key (Warning: only delete the unwanted ones! do not delete your normal (i.e. non virtualbox) network adapters!):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces

Be aware that you need TrustedInstaller permission. To obtain such permission I used this tool: https://github.com/jschicht/RunAsTI

yuliskov
  • 1,379
  • 15
  • 16
  • Thank you so much for this! Other people were recommending changing the owner of that key in Registry Editor, but that made me uneasy. Your solution works perfectly without modifying anything except the keys I'm trying to delete. I am finally able to clear out some old network adapters so I can reuse the original name. – Compeek Jan 10 '20 at 00:07
4

From the GUI

Global Tools > Host Network Manager

jmcgrath207
  • 1,317
  • 2
  • 19
  • 31
-6

go to control panel>adapters>and unstall the adapters you need