无法清除虚拟机

无法清除虚拟机
$ uname -a
Linux mypcname 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) i686 GNU/Linux

我正在尝试从系统中清除 Virtualbox,但它不起作用。基于此,看起来所有内容都已被删除:

$ sudo apt-get purge virtualbox*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'virtualbox-guest-additions-iso' for regex 'virtualbox*'
Note, selecting 'virtualbox-3.0' for regex 'virtualbox*'
Note, selecting 'virtualbox-3.1' for regex 'virtualbox*'
Note, selecting 'virtualbox-3.2' for regex 'virtualbox*'
Note, selecting 'virtualbox-source' for regex 'virtualbox*'
Note, selecting 'virtualbox-modules' for regex 'virtualbox*'
Note, selecting 'virtualbox-guest-dkms' for regex 'virtualbox*'
Note, selecting 'virtualbox-2.0' for regex 'virtualbox*'
Note, selecting 'virtualbox-2.1' for regex 'virtualbox*'
Note, selecting 'virtualbox-2.2' for regex 'virtualbox*'
Note, selecting 'virtualbox-qt' for regex 'virtualbox*'
Note, selecting 'virtualbox' for regex 'virtualbox*'
Note, selecting 'virtualbox-dbg' for regex 'virtualbox*'
Note, selecting 'virtualbox-guest-x11' for regex 'virtualbox*'
Note, selecting 'virtualbox-guest-source' for regex 'virtualbox*'
Note, selecting 'virtualbox-guest-additions' for regex 'virtualbox*'
Note, selecting 'virtualbox-ose' for regex 'virtualbox*'
Note, selecting 'virtualbox-guest-modules' for regex 'virtualbox*'
Note, selecting 'virtualbox-5.0' for regex 'virtualbox*'
Note, selecting 'virtualbox-guest-utils' for regex 'virtualbox*'
Note, selecting 'virtualbox-4.0' for regex 'virtualbox*'
Note, selecting 'virtualbox-4.1' for regex 'virtualbox*'
Note, selecting 'virtualbox-4.2' for regex 'virtualbox*'
Note, selecting 'virtualbox-4.3' for regex 'virtualbox*'
Note, selecting 'virtualbox-dkms' for regex 'virtualbox*'
Package 'virtualbox-modules' is not installed, so not removed
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-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-5.0' is not installed, so not removed
Note, selecting 'virtualbox-guest-dkms' instead of 'virtualbox-guest-modules'
Package 'virtualbox-guest-additions' is not installed, so not removed
Package 'virtualbox-ose' is not installed, so not removed
Package 'virtualbox' is not installed, so not removed
Package 'virtualbox-dbg' is not installed, so not removed
Package 'virtualbox-dkms' is not installed, so not removed
Package 'virtualbox-guest-dkms' is not installed, so not removed
Package 'virtualbox-guest-source' is not installed, so not removed
Package 'virtualbox-guest-utils' is not installed, so not removed
Package 'virtualbox-guest-x11' is not installed, so not removed
Package 'virtualbox-qt' is not installed, so not removed
Package 'virtualbox-source' is not installed, so not removed
Package 'virtualbox-guest-additions-iso' 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
The following package was automatically installed and is no longer required:
  libnotify-bin
Use 'apt-get autoremove' to remove it.

但当我搜索系统时,它仍然出现:

$ sudo updatedb
$ locate virtualbox
/usr/share/app-install/desktop/virtualbox.desktop
/usr/share/app-install/icons/virtualbox.png
/var/cache/apt/archives/virtualbox-guest-dkms_4.1.18-dfsg-2+deb7u4_all.deb
/var/cache/apt/archives/virtualbox-guest-dkms_4.3.18-dfsg-3+deb8u2_all.deb
/var/cache/apt/archives/virtualbox-guest-dkms_4.3.18-dfsg-3_all.deb
/var/cache/apt/archives/virtualbox-guest-dkms_4.3.36-dfsg-1+deb8u1_all.deb
/var/cache/apt/archives/virtualbox-guest-utils_4.1.18-dfsg-2+deb7u4_i386.deb
/var/cache/apt/archives/virtualbox-guest-utils_4.3.18-dfsg-3+deb8u2_i386.deb
/var/cache/apt/archives/virtualbox-guest-utils_4.3.18-dfsg-3_i386.deb
/var/cache/apt/archives/virtualbox-guest-utils_4.3.36-dfsg-1+deb8u1_i386.deb
/var/cache/apt/archives/virtualbox-guest-x11_4.1.18-dfsg-2+deb7u4_i386.deb
/var/cache/apt/archives/virtualbox-guest-x11_4.3.18-dfsg-3+deb8u2_i386.deb
/var/cache/apt/archives/virtualbox-guest-x11_4.3.18-dfsg-3_i386.deb
/var/cache/apt/archives/virtualbox-guest-x11_4.3.36-dfsg-1+deb8u1_i386.deb

这些看起来像安装文件,所以我猜它实际上不是已安装,但它仍然不是清除的。我应该只看rm文件吗?或者有没有办法apt删除这些文件?

答案1

没关系。这做到了这一点:

$ sudo apt-get autoclean
Reading package lists... Done
Building dependency tree       
Reading state information... Done
$ sudo updatedb
$ locate virtualbox
/usr/share/app-install/desktop/virtualbox.desktop
/usr/share/app-install/icons/virtualbox.png

相关内容