I am not new to linux and have had to face the occasional odd package or install situation but this tops all of them. At this point I just want to kill it with fire!

I have Virtualbox-5.1 in a somewhat messed up state. It seems something went wrong when i tried to upgrade to it a couple of months back and I never bothered to investigate. Ever since trying to install it I get error messages every time I upgrade packages. To be specific:

Running VMs found

VirtualBox is currently running. Please close it and try again. Please note that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to finish running.

Now I did the usual ps -aux | grep vbox and ps -aux | grep virtualbox and I can assure you, no vbox processes are running.

I also checked /tmp for any lock files which should be named '.vbox-username-ipc'. It is not there.

I have no idea how i got my system in this state but I would very much like to remove virtualbox without having to reinstall. Any input ?

  • That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals. – Takkat Sep 21 '16 at 7:43
  • no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running. – Klaus Steinhauer Sep 22 '16 at 4:13
  • That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this. – Takkat Sep 22 '16 at 6:22
  • I hadn't found that thread before. But: the directory is empty. – Klaus Steinhauer Sep 23 '16 at 6:37
up vote 11 down vote accepted

I had the same problem, but just a little bit differently. I tried to reinstall virtualbox (switching from distro to official release) and it failed to uninstall, so I could not remove or install the new copy. I managed to fix the issue by creating an empty file: /usr/lib/virtualbox/prerm-common.sh

Edit: Make the file executable with chmod +x /usr/lib/virtualbox/prerm-common.sh

Then running sudo apt-get remove virtualbox

  • 4
    brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked! – Klaus Steinhauer Oct 12 '16 at 12:41
  • Glad it worked for you too! – TheBat Oct 12 '16 at 13:49

I had the same problem. I solved it by killing all the VB processes.

  • get all the processes containing VB

    ps -A | grep VB
  • then kill all processes with the command

    sudo kill <pid>

replace <pid> with the process IDs of the processes you got from above command.

  • then run

    sudo apt-get remove virtualbox-* --purge
  • 1
    That's the perfect answer. – maxagaz Nov 24 '17 at 4:39

I tried everything suggested here and anywhere else but nothing worked. It kept saying that Running VMs found. What it turned out to be in the end was the fact, that there was autostart.cfg file in /ect/vbox. After I removed/moved this file the installation went smoothly. Hard to believe that I spent such a long time trying to resolve this.

The answer was hidden here https://forums.virtualbox.org/viewtopic.php?f=7&t=74786

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.