如何删除操作系统找不到的软件包?

如何删除操作系统找不到的软件包?

请您的帮助,如何删除我的所有 VMware 依赖项?

我尝试安装 'VMware Workstation Pro 14.0.0 build 6661328 for Linux'但想切换到 VirtualBox..

someone@someone-System-Product-Name:/usr/bin$ sudo find / -name vmware
/var/log/vmware
/var/lib/vmware
/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware
/etc/vmware
/etc/init.d/vmware
/etc/vmware-tools/scripts/vmware
/usr/bin/vmware
/usr/lib/vmware-ovftool/schemas/vmware
/usr/lib/vmware
/usr/lib/vmware/bin/vmware
/usr/src/linux-headers-4.15.0-29-generic/include/config/infiniband/vmware
/usr/src/linux-headers-4.15.0-29-generic/include/config/vmware
/usr/src/linux-headers-4.15.0-45-generic/include/config/infiniband/vmware
/usr/src/linux-headers-4.15.0-45-generic/include/config/vmware
/run/vmware

someone@someone-System-Product-Name:/usr/bin$ sudo apt-get autoremove vmware
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vmware


someone@someone-System-Product-Name:/usr/bin$ sudo apt-get purge  vmware
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vmware

文件夹结构:

someone@someone-System-Product-Name:~/Downloads/VMware Workstation Pro 14.0.0 build 6661328 for Linux$ ls -l
total 447800
-rw-rw-r-- 1 someone someone        29 Feb 14 15:32 serial.txt
-rw-rw-r-- 1 someone someone       119 Feb 14 15:32 sha256.sum
-rwxrwxr-x 1 someone someone 458534208 Feb 14 15:32 VMware-Workstation-Full-14.0.0-6661328.x86_64.bundle

然后我尝试运行长脚本来删除所有内容并收到此消息。

sudo rm -rf /var/log/vmware && 
sudo rm -rf /snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware &&
sudo rm -rf /etc/vmware &&
sudo rm -rf /etc/vmware-tools/scripts/vmware &&
sudo rm -rf /usr/lib/vmware &&
sudo rm -rf /usr/src/linux-headers-4.15.0-29-generic/include/config/infiniband/vmware &&
sudo rm -rf /usr/src/linux-headers-4.15.0-29-generic/include/config/vmware &&
sudo rm -rf /usr/src/linux-headers-4.15.0-45-generic/include/config/infiniband/vmware &&
sudo rm -rf /usr/src/linux-headers-4.15.0-45-generic/include/config/vmware

消息:

rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/__init__.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/__pycache__/__init__.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__init__.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/__init__.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/boot_proto.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config_custom_script.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config_file.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config_namespace.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config_nic.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config_passwd.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/config_source.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/guestcust_error.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/guestcust_event.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/guestcust_state.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/guestcust_util.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/ipv4_mode.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/nic.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/nic_base.cpython-35.pyc': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/boot_proto.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_custom_script.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_file.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_namespace.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_nic.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_passwd.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_source.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/guestcust_error.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/guestcust_event.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/guestcust_state.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/guestcust_util.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/ipv4_mode.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/nic.py': Read-only file system
rm: cannot remove '/snap/core/4917/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/nic_base.py': Read-only file system


someone@someone-System-Product-Name:~$ dpkg -l snap
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  snap           <none>       <none>       (no description available)


someone@someone-System-Product-Name:~$ dpkg -l vmware
dpkg-query: no packages found matching vmware
someone@someone-System-Product-Name:~$ dpkg -l *vmware*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description

答案1

根据VMware网站卸载应由

sudo vmware-installer -u vmware-workstation

相关内容