How To Uninstall VirtualBox (Windows/Mac/Linux)

How To Uninstall VirtualBox (Windows/Mac/Linux)

VirtualBox lets you run multiple operating systems on a single machine.1 It’s a versatile tool often used for development, testing, and creating isolated environments. However, there are situations where you might want to uninstall VirtualBox. One common reason is if you no longer need to run virtual machines or if you’re facing compatibility issues with your host operating system, such as conflicts with software updates or drivers. Additionally, removing VirtualBox can be a sensible choice for users looking to free up disk space or optimize system performance, as virtual machines and related files can consume a substantial amount of storage and system resources. In this article, we will go through how to uninstall VirtualBox from Windows, Mac, and Linux.

Uninstall VirtualBox on Windows

To uninstall VirtualBox from your Windows computer, you can follow these steps:23

  1. Ensure you have closed any VirtualBox-related processes or virtual machines that are running.
  2. Open the Control Panel, go to Programs, and select Uninstall a program.
  3. Scroll through the list of installed programs to find Oracle VM VirtualBox.
  4. Select it and click the Uninstall button above the list of programs.
  5. Follow the wizard to proceed with the removal.
  6. You might be asked to confirm the action, so if prompted, click Yes or OK to confirm the uninstallation.
  7. Proceed through the uninstallation wizard, if there is one, by clicking Next or Uninstall and then Yes or OK to confirm.
  8. If prompted, restart your computer to complete the uninstallation process.

Uninstall Virtualbox on Mac

To uninstall VirtualBox from your Mac, you can follow these steps:

Method 1: Uninstalling VirtualBox using the VirtualBox Uninstaller:

VirtualBox ships with its own uninstaller script. Here’s how to use it:4

  1. Close any running VirtualBox virtual machines and the VirtualBox application itself.
  2. Open a Terminal window. You can find Terminal in the Utilities folder within the Applications folder or search for it using Spotlight (Command + Space, then type “Terminal”).
  3. In the Terminal, type the following command and press Enter: sudo /Library/Application\ Support/VirtualBox/uninstall.tool.
  4. If asked for your Mac password, provide it and hit Enter.
  5. The uninstaller will remove VirtualBox and all of its associated components. Once it’s finished, you will see “Done” in the Terminal.

Method 2: Manual Uninstallation (if the VirtualBox Uninstaller doesn’t work):

If the above method doesn’t work or you want to ensure all VirtualBox components are removed, you can try manually uninstalling VirtualBox:5

  1. Close VirtualBox and any running virtual machines.
  2. Open Finder and go to your Applications folder then drag the VirtualBox app to the Trash.
  3. Next, remove the VirtualBox kernel extensions. In the Terminal, run the following command to list them: kextstat | grep org.virtualbox.
  4. For each entry listed, you can unload the kernel extension by running the following command (replace <kext_id> with the actual identifier): sudo kextunload -b <kext_id>.
  5. Now, you need to delete the kernel extensions. Use the sudo rm -r command to remove each one. For example: sudo rm -r /Library/Extensions/VirtualBox.kext.
  6. Remove VirtualBox preferences and support files. These are typically located in the following locations:
    • /Library/Application Support/VirtualBox
    • ~/Library/VirtualBox
    You can delete these folders using the sudo rm -r command.
  7. Lastly, remove any VirtualBox-related files in the /var/db/receipts directory. These files might have names like org.virtualbox.pkg.*. Use the sudo rm command to delete them.
  8. Empty the Trash to permanently delete the VirtualBox application and related files.
  9. Restart your Mac to complete the uninstallation process.

Uninstall Virtualbox on Linux

  1. Open a terminal by pressing Ctrl + Alt + T or searching for “Terminal” in your application menu.
  2. Uninstall VirtualBox by removing the package that was installed on your system. How you do this depends on your Linux distribution:
    • Debian/Ubuntu (using APT): sudo apt-get remove virtualbox. If you also want to remove configuration files, you can use purge instead of remove: sudo apt-get purge virtualbox.6
    • Fedora/RHEL (using DNF or Yum): sudo dnf remove VirtualBox or sudo yum remove VirtualBox.
    • openSUSE (using Zypper):sudo zypper remove virtualbox.7
    • Arch Linux (using Pacman):sudo pacman -R virtualbox.
    • Other distributions: The package name and command may vary depending on your specific distribution. You can use your package manager to search for and remove VirtualBox. For example, you can use yum on CentOS, zypper on openSUSE, or other package managers as appropriate.
  3. Remove VirtualBox kernel modules: VirtualBox installs kernel modules to work with the Linux kernel. You should unload and remove these modules: sudo /sbin/vboxconfig This command will remove the VirtualBox kernel modules.
  4. Remove VirtualBox configuration files (optional): If you want to remove configuration files and any remaining VirtualBox data, you can use the following command: rm -r ~/.config/VirtualBox.

It’s good practice to reboot your computer after uninstalling software to ensure all changes take effect.

References

  1. Bunkar, A. (2021, April 20). Run Multiple Operating Systems on a Single Machine with VirtualBox. Open Source For You. https://www.opensourceforu.com/2016/01/run-multiple-operating-systems-on-a-single-machine-with-virtualbox/ ↩︎
  2. Senevirathne, D. (2022, November 16). How to completely uninstall VirtualBox in Windows. Help Desk Geek. https://helpdeskgeek.com/virtualization/how-to-completely-uninstall-virtualbox-in-windows/ ↩︎
  3. Kinyua, P., & Kinyua, P. (2022, February 14). Can’t update Windows 10 because VirtualBox needs to be uninstalled. Auslogics Blog. https://www.auslogics.com/en/articles/cant-update-windows-10-because-virtualbox-needs-to-be-uninstalled/ ↩︎
  4. Arjunan, A. N. (2023, February 2). How to safely uninstall VirtualBox from a Mac. MUO. https://www.makeuseof.com/how-to-uninstall-virtualbox-mac/ ↩︎
  5. Karapetyan, A., & Karapetyan, A. (2023a, June 29). How to uninstall VirtualBox from Mac. Nektony. https://nektony.com/how-to/uninstall-virtualbox-on-mac ↩︎
  6. Nek, D. (2023b, October 21). How to uninstall VirtualBox on Ubuntu. Linux Tutorials for Beginners. https://webhostinggeeks.com/howto/how-to-uninstall-virtualbox-on-ubuntu/ ↩︎
  7. Rumi. (2023, September 3). Remove VirtualBox from Linux. Bots! https://tweenpath.net/remove-virtualbox-linux/ ↩︎
Published