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
    you don't uninstall virtual machines, you either delete them, or mount a Centos install disk to the VM, and boot from it to reinstall the OS over the existing one. as for your virtualbox settings, they are likely in your user profile in your %appdata% directory, so check in `C:\Users\yourusernamehere\Appdata\Local\.virtualbox`. May 23, 2017 at 22:23

5 Answers 5


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).

  • @CliffCliffer Welcome, glad that it did. It's my first answer on superuser. May 25, 2017 at 11:37
  • Does this remove the drivers that are installed alongside VirutalBox?
    – Stevoisiak
    Aug 6, 2019 at 19:13
  • @Stevoisiak Which drivers are you referring to? I don't know of any drivers that are installed alongside VirtualBox. Aug 7, 2019 at 10:19
  • 2
    To keep corrupt machines from coming back after reinstall I had to search the drive for "virtualbox" and delete everything that came up. The above was insufficient. Apr 22, 2020 at 23:06
  • @ChrisJenks Thanks your comment might help someone with the same issue as you. Apr 23, 2020 at 15:19

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 ../NET Maybe 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?

  • 1
    Nice findings for all the places where it leaves its traces. However, this creates much more panic than needed ("this procedure is dangerous") ...as usually with system tweak guids - come on people its just an OS. Usually, user data is left untouched and can be recovered easily by hooking up the harddrive to another computer.
    – masterxilo
    Sep 24, 2018 at 11:56
  • It depends on the recover tools you dispose. This disclaimer was suggested by Ramhound.
    – Hope
    Sep 27, 2018 at 16:20

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.
  • Hi David, where can I find the installer? Is there a default location for where the installer would be? Dec 31, 2022 at 3:23

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

  • Whenever I want to truly uninstall a program in Windows, I use Revo Uninstaller (the free version will do just fine), let the uninstaller that comes with the program I want to get rid of do its job (Revo starts it for me), then click on the Advanced radio button in Revo, and proceed to delete each and every pre-checked file and folder Revo lists for me. I reboot if need be (with VirtualBox, it's better to reboot), and I usually have no aftermath to live with.
    – user1019780
    Apr 12, 2020 at 9:20
  • 3
    I don’t see how this relates to the question.
    – Daniel B
    Apr 12, 2020 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .