I have tried removing it via Ubuntu Software center directly directly, but it says Unable to remove Virtualbox as it doesn't exist
I tried to run sudo apt-get remove virtualbox-* which didn't work either. I installed Vbox by downloading its .deb file from the official site. Double clicking on the .deb file opened Ubuntu Software app from where I installed Vbox The following is the output of the remove cmd
anjug@anjug-vostro-15-3568:~$ sudo apt-get remove virtualbox-\*
[sudo] password for anjug:
Sorry, try again.
[sudo] password for anjug:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'virtualbox-source' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-utils' for glob 'virtualbox-*'
Note, selecting 'virtualbox-ose' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-modules' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-additions-iso' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-dkms' for glob 'virtualbox-*'
Note, selecting 'virtualbox-dkms' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-dkms-hwe' for glob 'virtualbox-*'
Note, selecting 'virtualbox-ext-pack' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-modules-hwe' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-x11-hwe' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-source' for glob 'virtualbox-*'
Note, selecting 'virtualbox-qt' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-source-hwe' for glob 'virtualbox-*'
Note, selecting 'virtualbox-2.0' for glob 'virtualbox-*'
Note, selecting 'virtualbox-2.1' for glob 'virtualbox-*'
Note, selecting 'virtualbox-2.2' for glob 'virtualbox-*'
Note, selecting 'virtualbox-modules' for glob 'virtualbox-*'
Note, selecting 'virtualbox-3.0' for glob 'virtualbox-*'
Note, selecting 'virtualbox-3.1' for glob 'virtualbox-*'
Note, selecting 'virtualbox-3.2' for glob 'virtualbox-*'
Note, selecting 'virtualbox-4.0' for glob 'virtualbox-*'
Note, selecting 'virtualbox-4.1' for glob 'virtualbox-*'
Note, selecting 'virtualbox-4.2' for glob 'virtualbox-*'
Note, selecting 'virtualbox-4.3' for glob 'virtualbox-*'
Note, selecting 'virtualbox-5.0' for glob 'virtualbox-*'
Note, selecting 'virtualbox-5.1' for glob 'virtualbox-*'
Note, selecting 'virtualbox-5.2' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-utils-hwe' for glob 'virtualbox-*'
Note, selecting 'virtualbox-6.0' for glob 'virtualbox-*'
Note, selecting 'virtualbox-6.1' for glob 'virtualbox-*'
Note, selecting 'virtualbox-guest-x11' for glob 'virtualbox-*'
Package 'virtualbox-5.0' is not installed, so not removed
Package 'virtualbox-5.1' is not installed, so not removed
Package 'virtualbox-5.2' is not installed, so not removed
Package 'virtualbox-6.0' is not installed, so not removed
Note, selecting 'virtualbox-dkms' instead of 'virtualbox-modules'
Package 'virtualbox-2.0' is not installed, so not removed
Package 'virtualbox-2.1' is not installed, so not removed
Package 'virtualbox-2.2' is not installed, so not removed
Package 'virtualbox-3.0' is not installed, so not removed
Package 'virtualbox-3.1' is not installed, so not removed
Package 'virtualbox-3.2' is not installed, so not removed
Package 'virtualbox-4.0' is not installed, so not removed
Package 'virtualbox-4.1' is not installed, so not removed
Package 'virtualbox-4.2' is not installed, so not removed
Package 'virtualbox-4.3' is not installed, so not removed
Package 'virtualbox-guest-modules-hwe' is not installed, so not removed
Package 'virtualbox-ose' is not installed, so not removed
Package 'virtualbox-dkms' is not installed, so not removed
Package 'virtualbox-ext-pack' is not installed, so not removed
Package 'virtualbox-guest-additions-iso' is not installed, so not removed
Package 'virtualbox-guest-dkms' is not installed, so not removed
Package 'virtualbox-guest-dkms-hwe' is not installed, so not removed
Package 'virtualbox-guest-source' is not installed, so not removed
Package 'virtualbox-guest-source-hwe' is not installed, so not removed
Package 'virtualbox-guest-utils' is not installed, so not removed
Package 'virtualbox-guest-utils-hwe' is not installed, so not removed
Package 'virtualbox-guest-x11' is not installed, so not removed
Package 'virtualbox-guest-x11-hwe' is not installed, so not removed
Package 'virtualbox-qt' is not installed, so not removed
Package 'virtualbox-source' is not installed, so not removed
The following packages were automatically installed and are no longer required:
libdouble-conversion3 libpcre2-16-0 libpython2-stdlib libpython2.7-minimal
libpython2.7-stdlib libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5
libqt5opengl5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5x11extras5
libsdl-ttf2.0-0 libsdl1.2debian libxcb-xinerama0 libxcb-xinput0
linux-headers-5.4.0-58 linux-headers-5.4.0-58-generic
linux-image-5.4.0-58-generic linux-modules-5.4.0-58-generic
python-is-python2 python2 python2-minimal python2.7 python2.7-minimal
qt5-gtk-platformtheme qttranslations5-l10n
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
virtualbox-6.1
0 upgraded, 0 newly installed, 1 to remove and 12 not upgraded.
After this operation, 216 MB disk space will be freed.
Do you want to continue? [Y/n] Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 221902 files and directories currently installed.)
Removing virtualbox-6.1 (6.1.16-140961~Ubuntu~eoan) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package virtualbox-6.1 (--remove):
installed virtualbox-6.1 package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Errors were encountered while processing:
virtualbox-6.1
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
anjug@anjug-vostro-15-3568:~$ ^C
VirtualBox is currently installed in my system because I can run the app by tapping on its icon. My doubt is that it's installed brokenly in other than the default directory so the standard uninstalltion is unable to detect it. Here is the search result view of "Virtualbox" in the root directory