Page 1 of 1

Cannot Uninstall Virtualbox

Posted: 23. Oct 2016, 21:10
by purcell
I have completely hosed my virtualbox install. I am trying to completely uninstall it so I can then install and get it working again. This is running on ubuntu 16.04

I have the following installed on my system:
- virtualbox-5.1 5.1.8-111374~U 5.1.8-111374~U
- virtualbox-ext-pack 5.0.24-0ubuntu 5.0.24-0ubuntu


When I try to uninstall I get following error message looping until I cancel out:
---------------------
You will not be able to start VMs until this problem is fixed.
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.4.0-45-generic) or it failed to
load. Please recompile the kernel module and install it by

sudo /sbin/vboxconfig
--------------------------------------------------------
*** but there no longer exists any /sbin/vboxconfig

Any suggestions would be much appreciated

Re: Cannot Uninstall Virtualbox

Posted: 23. Oct 2016, 23:22
by socratis
purcell wrote:When I try to uninstall I get following error message
The message should not appear when you try to uninstall VirtualBox, AFAIK. How are you trying to uninstall it?

Plus I see different versions of VirtualBox and extension pack, maybe from the Ubuntu repository? You need to clean/purge your installation within your system completely. I don't remember the appropriate commands, but I believe Synaptic is the way to look for vbox* and/or virtualbox* and remove them.

Re: Cannot Uninstall Virtualbox

Posted: 24. Oct 2016, 02:15
by purcell
Well apt-get remove --purge generated the error as well as dpkg. Yeah the having files from two different versions is a complication of me trying to uninstall 5.0 and then install 5.1. Something went horribly wrong. Aptitude could not uninstall either.

I installed synaptic and it failed with the same error as in my first post.

Any ideas for alternatives?

Re: Cannot Uninstall Virtualbox

Posted: 24. Oct 2016, 03:27
by purcell
I went back to apt-get remove and received this output:

Code: Select all

root@purcell-shinybeast:/etc/apt# sudo apt-get remove --purge virtualbox-5.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgsoap8 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt
Suggested packages:
  vde2 virtualbox-guest-additions-iso
The following packages will be REMOVED:
  virtualbox-5.1*
The following NEW packages will be installed:
  libgsoap8 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 5 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/22.5 MB of archives.
After this operation, 61.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
Selecting previously unselected package virtualbox-dkms.
(Reading database ... 494499 files and directories currently installed.)
Preparing to unpack .../virtualbox-dkms_5.0.24-dfsg-0ubuntu1.16.04.1_all.deb ...
Unpacking virtualbox-dkms (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Selecting previously unselected package libgsoap8:amd64.
Preparing to unpack .../libgsoap8_2.8.28-1_amd64.deb ...
Unpacking libgsoap8:amd64 (2.8.28-1) ...
Selecting previously unselected package libvncserver1:amd64.
Preparing to unpack .../libvncserver1_0.9.10+dfsg-3build1_amd64.deb ...
Unpacking libvncserver1:amd64 (0.9.10+dfsg-3build1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
dpkg: virtualbox-5.1: dependency problems, but removing anyway as you requested:
 virtualbox-ext-pack depends on virtualbox (>= 5.0) | virtualbox-5.0 | virtualbox-5.1; however:
  Package virtualbox is not installed.
  Package virtualbox-5.1 which provides virtualbox is to be removed.
  Package virtualbox-5.0 is not installed.
  Package virtualbox-5.1 is to be removed.
 virtualbox-ext-pack depends on virtualbox (>= 5.0) | virtualbox-5.0 | virtualbox-5.1; however:
  Package virtualbox is not installed.
  Package virtualbox-5.1 which provides virtualbox is to be removed.
  Package virtualbox-5.0 is not installed.
  Package virtualbox-5.1 is to be removed.

(Reading database ... 494802 files and directories currently installed.)
Removing virtualbox-5.1 (5.1.8-111374~Ubuntu~xenial) ...
dpkg: error processing package virtualbox-5.1 (--purge):
 subprocess installed pre-removal script returned error exit status 1
/var/lib/dpkg/info/virtualbox-5.1.postinst: 95: /var/lib/dpkg/info/virtualbox-5.1.postinst: /usr/lib/virtualbox/prerm-common.sh: not found
/var/lib/dpkg/info/virtualbox-5.1.postinst: 96: /var/lib/dpkg/info/virtualbox-5.1.postinst: /usr/lib/virtualbox/postinst-common.sh: not found
Errors were encountered while processing:
 virtualbox-5.1
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@purcell-shinybeast:/etc/apt# 

Re: Cannot Uninstall Virtualbox

Posted: 24. Oct 2016, 14:45
by Perryg
I would clean the apt-get cache and then run an update. Following this I would try to do an install ( preferably using dpkg and not apt ). Also the files listed are not from the official version of VirtualBox so at one point you must have installed the fork. This adds another layer of complexity which you must address with the distro since we have no control over it.