Ubuntu已在16.04中删除了Python 2。但是,升级后仍会安装它(它不是“过时的软件包”的一部分)。
有没有一种干净的方法可以以干净的方式删除Python 2及其所有依赖项(以完全摆脱它)?
有apt purge
路要走吗?
root@ubuntu ~# apt purge python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnss-ldap
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
auth-client-config* ldap-auth-client* ldap-auth-config* libpam-ldap* libsmbclient* ndiff* python* python-bs4* python-chardet* python-crypto* python-dnspython*
python-html5lib* python-ldb* python-lxml* python-ntdb* python-pkg-resources* python-samba* python-setuptools* python-six* python-talloc* python-tdb* python2.7* samba*
samba-common-bin* samba-dsdb-modules* samba-libs* samba-vfs-modules* smbclient* winbind*
0 upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
After this operation, 58.4 MB disk space will be freed.
由于仍然有许多依赖于Python2的软件包(例如Samba和VirtualBox),因此在继续进行操作之前,应仔细查看易于删除的软件包。
采用
sudo apt purge python2.7-minimal
完全删除Python2及其相关的所有内容。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句