A python script to uninstall pkg on MacOS

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 que…


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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » A python script to uninstall pkg on MacOS." Dilawar Singh | Sciencx - Thursday November 7, 2024, https://www.scien.cx/2024/11/07/a-python-script-to-uninstall-pkg-on-macos/
HARVARD
Dilawar Singh | Sciencx Thursday November 7, 2024 » A python script to uninstall pkg on MacOS., viewed ,<https://www.scien.cx/2024/11/07/a-python-script-to-uninstall-pkg-on-macos/>
VANCOUVER
Dilawar Singh | Sciencx - » A python script to uninstall pkg on MacOS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/11/07/a-python-script-to-uninstall-pkg-on-macos/
CHICAGO
" » A python script to uninstall pkg on MacOS." Dilawar Singh | Sciencx - Accessed . https://www.scien.cx/2024/11/07/a-python-script-to-uninstall-pkg-on-macos/
IEEE
" » A python script to uninstall pkg on MacOS." Dilawar Singh | Sciencx [Online]. Available: https://www.scien.cx/2024/11/07/a-python-script-to-uninstall-pkg-on-macos/. [Accessed: ]
rf:citation
» A python script to uninstall pkg on MacOS | Dilawar Singh | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.