Can't uninstall Oracle VirtualBox 6.1
Solution 1
I fixed it. Virtualbox was actually running in the background, but it wasn't showing in the system monitor and that's why I wasn't able to see it.
I found the process with the command sudo ps -a which outputted this:
PID TTY TIME CMD
123500 tty2 00:00:19 Xorg
123531 tty2 00:00:00 gnome-session-b
124722 pts/1 00:00:01 frontend
124731 pts/1 00:00:00 virtualbox-6.1.
125166 pts/2 00:00:00 sudo
125167 pts/2 00:00:00 ps
Then I just did sudo killall virtualbox-6.1. and it let me remove it.
Solution 2
I had essentially the same issue. By doing the following, I was able to resolve it:
sudo mkdir /usr/lib/virtualbox
sudo touch /usr/lib/virtualbox/postinst-common.sh
sudo touch /usr/lib/virtualbox/prerm-common.sh
sudo chmod +x /usr/lib/virtualbox/postinst-common.sh
sudo chmod +x /usr/lib/virtualbox/prerm-common.sh
Then I was able to install an upgraded Virtualbox.
Related videos on Youtube
Azgalor
I switched from Windows to Ubuntu because I wanted to learn how to use Linux and Debian based distros.
Updated on September 18, 2022Comments
-
Azgalor almost 2 years
I'm using Ubuntu 20.04 and it's my main OS (No other OS installed except for Ubuntu)
When I try to uninstall Oracle VirtualBox 6.1 it says that there are VMs running even though there aren't (I checked all the processes running at the time)
I screenshotted this after trying to uninstall VirtualBox 6.1 and it keeps happening with every command that tries to remove it:
I already tried running these commands:
sudo apt-get purge virtualbox-6.1:amd64 sudo apt-get --reinstall install virtualbox sudo apt-get remove virtualbox-6.1
And as you can see from the commands listed I even tried reinstalling it
And even in the Ubuntu Software app it says that there are no packages to remove
Unable to remove "Oracle VM VirtualBox": no packages to remove
-
Liso about 4 yearsWhat exactly is the error message you receive ?
-
K7AAY about 4 yearsInstall on which OS? Please advise the distribution and the release number of the host OS.
-
Azgalor about 4 yearsI'm using Ubuntu 20.04. I'm not really sure what you mean with host OS, but Ubuntu is my main OS. The error message that I receive is that I have running VMs (as the picture that I posted shows) and because of that I can't reinstall it or remove it from my system.
-
-
Azgalor about 4 yearsThanks for the answer, but for whatever reason it keeps telling me that there are VMs running (There are not, I already checked the running processes)