Skip to content

Instantly share code, notes, and snippets.

@eladkarako
Last active March 29, 2026 21:46
Show Gist options
  • Select an option

  • Save eladkarako/e003c1cf6fbfbf0de68b99629663862a to your computer and use it in GitHub Desktop.

Select an option

Save eladkarako/e003c1cf6fbfbf0de68b99629663862a to your computer and use it in GitHub Desktop.
oracle virtualbox post-uninstall cleanup
************
* installing over dead or broken installation can help with uninstallation process in case you are stuck https://download.virtualbox.org/virtualbox/7.2.6/VirtualBox-7.2.6a-172322-Win.exe
* run as admin (or run cmd.exe as admin and run either of those from there):
* appwiz.cpl
* %SystemRoot%\System32\control.exe "appwiz.cpl",%*
* %SystemRoot%\System32\rundll32.exe shell32.dll,Control_RunDLLAsUser "appwiz.cpl",
* now try again uninstalling
* try placing your vm folder on a non ssd drive, and if possible (you've got sufficient disk space) - pre assign the entire disk space.
* before deleting the configuration files under "..../.VirtualBox/" take a look to familiar yourself with possible junk leftout..
* folders are deleted in two steps to help various access issues.
* the configuration files under .VirtualBox/ might be important to you.
*
* additional registry cleanup of services such as VBoxNetAdp6.sys - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxNetAdp
* use https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns
* and uncheck the service. after reboot you'll be able to uninstall it or delete its registry entry.
************
del /f /q "C:\Windows\Prefetch\VIRTUALBOX.EXE-*.pf"
del /f /s /q "C:\Users\%UserName%\.VirtualBox\"
rmdir /s /q "C:\Users\%UserName%\.VirtualBox"
del /f /s /q "C:\Users\%UserName%\VirtualBox VMs\"
rmdir /s /q "C:\Users\%UserName%\VirtualBox VMs"
del /f /q "C:\Users\%UserName%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu\Oracle VirtualBox.lnk"
del /f /s /q "C:\Program Files\Oracle\VirtualBox\"
rmdir /s /q "C:\Program Files\Oracle\VirtualBox"
del /f /q "C:\Users\%UserName%\AppData\Roaming\Microsoft\Windows\Recent\*virtualbox*.lnk"
del /f /s /q "C:\Windows\System32\config\systemprofile\AppData\Roaming\VirtualBox\"
rmdir /s /q "C:\Windows\System32\config\systemprofile\AppData\Roaming\VirtualBox"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment