Complete uninstall Virtualbox

Few days ago my VirtualMachine Centos refused to launch. It says an "an unexpected shutdown happened before" so it refuses to start and gives error. Now, after unsuccessful, side by side searching internet for a solution, i decided to uninstall it completely and to install everything from scratch. But however i uninstall the the Virtualmachine and next, Virtualbox it is doesn't help. After i install it again it still keeps the old settings and still gives that error. So, i am very upset, and really need help. I also followed Virtualbox uninstall documentation and no success because it just says to uninstall it ordinary way from Control Panel. I have also deleted all related folder also, but again no success. Plz help me. Thank in advance! (i can provide any info upon request)

1

5 Answers

After you uninstall Virtualbox from control Panel

You also have to delete the folder:

C:\Users\[Your User Name]\Appdata\Local\.virtualbox

You may have to enable Show hidden files and folders option for Appdata folder to be visible (see here for how to do this on Windows 7).

5

Disclaimer: this procedure is dangerous and can break your host system. Please backup your data or/and take a system image first. (That said, I've applied this procedure twice to my main Windows 7 machine, and the operating system is still running fine.)

My situation: I wanted to update from VirtualBox 5.1.22 to 5.1.28. The installer of newer version hanged near the end, so I needed to properly uninstall 5.1.22 first to get it work:

  1. Download psexec.exe and CCleaner. Then unplug network cable, turn off wifi. Kill google drive, dropbox, and other system-invasive tools (and do this again if you restart during the procedure).

  2. Uninstall using the VirtualBox uninstaller from Control Panel (for some reason I didn't have one on my machine).

  3. Remove the folders C:/Program Files/Oracle/VirtualBox and %userprofile%\.VirtualBox

  4. Remove virtual box drivers (files starting with VBox..) from C:\Windows\system32\drivers\

  5. Clean up windows registry: start regedit.exe as an administrator, search for VirtualBox everywhere and thoughtfully but carefully (don't break other stuff) delete the corresponding folders, keys and values.

At this point, I was blocked because I couldn't remove the children folders (which are VirtualBox network drivers) of Computer/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Enum/Root/NET/ folder. For me, the workaround consisted in

  • Download PsExec.exe to your desktop

  • Go Start and in "Start search" type in: cmd. Hold CTRL and SHIFT keys, press Enter. Command prompt window will open.

  • Copy and paste following command:"%userprofile%\desktop\psexec" -i -d -s c:\windows\regedit.exe

Using such the empowered version of regedit, you need

  • Take the ownership of ../NET folder (right click, "Permissions...", Advanced, Owner tab, check on "Replace owner on subcontainers and objects")

  • Add Full Control to OWNER RIGHTS

  • Remove all the children folders of ../NETMaybe you'll need to play around with the permission further, machine restarts might help.

Goal: ../NET should be clean of VirtualBox driver folders, and have the Full Control permissions for administrators and OWNER RIGHTS as well.

Then several passes of CCleaner followed by restarts, and finally you are clean. If everything was done correctly, you now will be able to successfully install the newest version of VirtualBox, if necessary.

Related question:How to uninstall Virtualbox on windows10?

2

The only thing that worked for me was to extract the original installer to the path.

This is what I did:

  1. Download the installer
  2. Open Command Prompt
  3. Change to dir containing the installer
  4. Run the installer with the --extract parameter. eg: VirtualBox-5.1.22-115126-Win.exe --extract
  5. Uninstall VirtualBox in the usual way (using "Add or Remove Programs" / "Apps & Features"), or you should be able to run the installer for your new version of VirtualBox.

As well as following the steps in the accepted answer I had to do the following step.

I am using a Windows 7 Enterprise.

In File Explorer enter %userprofile% in the addressbar. If you have Show hidden files and folders available you will see a folder called .VirtualBox.

Delete the .VirtualBox folder

Run the installer with the --extract parameter. eg: VirtualBox-5.1.22-115126-Win.exe --extract , this is working well

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like