Open the terminal and type:
sudo apt remove virtualbox unity-scope-virtualbox ^virtualbox-
How to uninstall Oracle VirtualBox
If you installed VirtualBox from the Oracle website find your VirtualBox version as follows:
sudo apt install aptitude
aptitude search virtualbox\*
The latest version of VirtualBox that has
Oracle VM VirtualBox on the same line with it is the package you have installed. If you have the latest version of Oracle VirtualBox installed, it is named
Verify that this version of Oracle VirtualBox is currently installed.
dpkg-query -s virtualbox-5.1
Uninstall Oracle VirtualBox using a command that looks like this:
sudo apt remove VirtualBox-5.1
If you have a different version of Oracle VirtualBox installed replace
VirtualBox-5.1 in the above command with your VirtualBox version.