This content originally appeared on DEV Community and was authored by Dilawar Singh
Script is here https://github.com/dilawar/Scripts/blob/master/pkg_uninstall.py
Usage
A sample run is shown below. Pass the pkg name as first argument to this script. The script will print the names of installed packages that matches the query. You select the pkg that you want to remove.
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 '/'.
And that’s it.
This content originally appeared on DEV Community and was authored by Dilawar Singh
Dilawar Singh | Sciencx (2024-11-07T22:53:27+00:00) A python script to uninstall pkg on MacOS. Retrieved from https://www.scien.cx/2024/11/07/a-python-script-to-uninstall-pkg-on-macos/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.