脚本在这里 https://github.com/dilawar/Scripts/blob/master/pkg_uninstall.py
示例运行如下所示。将 pkg 名称作为第一个参数传递给此脚本。该脚本将打印与查询匹配的已安装软件包的名称。您选择要删除的 pkg。
dilawar@halwa ~/Scripts (master)> sudo python3 pkg_uninstall.py clamav 0: com.cisco.ClamAV.programs 1: com.cisco.ClamAV.libraries 2: com.cisco.ClamAV.documentation Select a package to uninstall 0 Uninstalling com.cisco.ClamAV.programs Forgot package 'com.cisco.ClamAV.programs' on '/'. dilawar@halwa ~/Scripts (master)> sudo python3 pkg_uninstall.py clamav 0: com.cisco.ClamAV.libraries 1: com.cisco.ClamAV.documentation Select a package to uninstall 0 Uninstalling com.cisco.ClamAV.libraries Forgot package 'com.cisco.ClamAV.libraries' on '/'.
就是这样。
以上是在 MacOS 上卸载 pkg 的 python 脚本的详细内容。更多信息请关注PHP中文网其他相关文章!