如果使用PKG安裝程序安裝它,則可以:
pkgutil --pkgs
或更好:
pkgutil --pkgs | grep org.python.Python
它將輸出如下內(nèi)容:
org.python.Python.PythonApplications-2.7org.python.Python.PythonDocumentation-2.7org.python.Python.PythonFramework-2.7org.
python.Python.PythonProfileChanges-2.7org.python.Python.PythonUnixTools-2.7
現(xiàn)在可以選擇要取消鏈接(刪除)的包。
這是取消鏈接的文檔:
--unlink package-id Unlinks (removes) each file referenced by package-id. WARNING: This command makes no attempt to
perform reference counting or dependency analy-
sis. It can easily remove files required by your system. It may include unexpected files due to package tainting.
Use the --files command first
to double check.
在我的示例中,您將鍵入
pkgutil --unlink org.python.Python.PythonApplications-2.7pkgutil --unlink org.python.Python.PythonDocumentation-2.7pkgutil --unlink
org.python.Python.PythonFramework-2.7pkgutil --unlink org.python.Python.PythonProfileChanges-2.7pkgutil --unlink org.
python.Python.PythonUnixTools-2.7
或者用一行:
pkgutil --pkgs | grep org.python.Python | xargs -L1 pkgutil -f --unlink
重要內(nèi)容:-從獅子開始就不再有鏈接了(截至2014年第1季度,將包括獅子、山獅和小牛)。如果任何來看這個說明的人試著用它和獅子一起使用,應(yīng)該試著用這篇文章說的話來調(diào)整它:https:/wincent.com/wiki/卸載_Packages_(.pkg_file)_on_mac_OS_X