sudo apt-get remove --purge virtualbox-5.1 virtualbox-5.0 or whatever should remove the old one correctly
sudo apt-get remove --purge virtualbox-5.1 virtualbox-5.0 or whatever should remove the old one correctly