The 'Breaks existing package' error usually happens when you are trying to update VirtualBox from say version 5.0.x to 5.1.x. To resolve this issue you will first have to uninstall VirtualBox. Open your terminal and enter the commands below:
Now install VirtualBox using the code below. But first find the version number of the latest VirtualBox package available by visiting the following page: https://www.virtualbox.org/wiki/Downloads. When I checked the latest VirtualBox version available was: VirtualBox 5.1.22.
After upgrading VirtualBox you will also have to update your Extension Pack. You can download the Extension Pack from the aforementioned page.
sudo apt-get purge virtualbox-*
Now install VirtualBox using the code below. But first find the version number of the latest VirtualBox package available by visiting the following page: https://www.virtualbox.org/wiki/Downloads. When I checked the latest VirtualBox version available was: VirtualBox 5.1.22.
sudo apt-get update
sudo apt-get install virtualbox-5.1.22
After upgrading VirtualBox you will also have to update your Extension Pack. You can download the Extension Pack from the aforementioned page.