1

I am trying to uninstall virtualbox from my ubuntu machine using the command : sudo apt-get purge virtualbox* and sudo dpkg --purge --force-all virtualbox-6.0 but I keep getting this error.

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' 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-ose-fuse' 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-guest-x11' for glob 'virtualbox*'
Note, selecting 'virtualbox-guest-additions' for glob 'virtualbox*'
Package 'virtualbox-ose' is not installed, so not removed
Package 'virtualbox-ose-fuse' is not installed, so not removed
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
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-additions' is not installed, so not removed
Package 'virtualbox-guest-modules-hwe' is not installed, so not removed
Package 'virtualbox' 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:
  libqt5opengl5 libqt5printsupport5 libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  virtualbox-6.0*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 227 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 ... 203455 files and directories currently installed.)
Removing virtualbox-6.0 (6.0.14-133895~Ubuntu~bionic) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package virtualbox-6.0 (--remove):
 installed virtualbox-6.0 package pre-removal script subprocess returned error exit status 1
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.0
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish

karel
  • 110,292
  • 102
  • 269
  • 299
Hawkeye148
  • 11
  • 2
  • What does `sudo lsof | grep /var/cache/debconf/config.dat` show? – ajgringo619 Dec 03 '19 at 02:35
  • @ajgringo619 ``` lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse file system /run/user/1000/doc Output information may be incomplete. frontend 6899 root 4uW REG 8,4 45259 4983927 /var/cache/debconf/config.dat ``` – Hawkeye148 Dec 03 '19 at 11:30
  • Try this (run with sudo, of course): https://serverfault.com/questions/175278/debconf-dbdriver-config-var-cache-debconf-config-dat-is-locked-by-another-p#175280 – ajgringo619 Dec 04 '19 at 02:40
  • Does this answer your question? ["debconf: DbDriver "config": config.dat is locked by another process: Resource temporarily unavailable" while installing packages](https://askubuntu.com/questions/136881/debconf-dbdriver-config-config-dat-is-locked-by-another-process-resource-t) – karel Apr 19 '22 at 01:20

0 Answers0