How-to: Uninstall VirtualBox in Ubuntu Linux

In this tutorial, we will learn how to uninstall VirtualBox on Ubuntu Linux using the command-line interface.

Before uninstalling VirtualBox, you can run dpkg --get-selections | grep -i virtualbox command check if VirtualBox is installed on your Ubuntu Desktop.

check if VirtualBox is installed on your Ubuntu Desktop

To uninstall VirtualBox completely, run the following two commands:

apt-get purge virtualbox*
apt-get autoremove

The vboxsf and vboxusers, two Linux user groups that were created on Ubuntu during the VirtualBox install process, will not be deleted automatically. You can remove them manually by using the groupdel command:

groupdel vboxusers
groupdel vboxsf

The uninstall command also is not gonna remove the Virtual Machine Folder, where the virtual machines had been saved. In Ubuntu, this is the "VirtualBox VMs" folder in your home directory.

uninstall virtualbox ubuntu