ホームページ >バックエンド開発 >Python チュートリアル >MacOS で pkg をアンインストールする Python スクリプト

MacOS で pkg をアンインストールする Python スクリプト

Patricia Arquette
Patricia Arquetteオリジナル
2024-11-08 09:56:021104ブラウズ

A python script to uninstall pkg on MacOS

スクリプトはこちら https://github.com/dilawar/Scripts/blob/master/pkg_uninstall.py

使用法

サンプルの実行を以下に示します。 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 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。