Hello,
I wrote a simple script that glues
Here it is:
It should be said that this script should not be used unless you are absolutely sure you know you will not accidentally delete dependencies of packages that you will still need. If you run the script and PKGNG yells at you because dependencies are still required by other packages, review said dependencies and double check that you will not bork anything. To stop PKGNG complaining, modify this line of the script:
to...:
This will force PKGNG to remove the installed packages in question.
Hopefully someone out there has a use for this!
I wrote a simple script that glues
pkg info and pkg delete together. In my case, I switched desktop systems from Xfce, and tried to work out a way to just delete all packages in the database with "xfce" in their names. I accomplished this, and incarnated it in this bash script. Just run the script, input a string for pkg info to parse, y or n at the prompt and PKGNG will remove all packages containing your string.Here it is:
Code:
#!/usr/local/bin/bash
echo "Delete all packages containing...: \n"
read arg
pkgname=$(pkg info | grep "$arg")
pkg delete $pkgname
It should be said that this script should not be used unless you are absolutely sure you know you will not accidentally delete dependencies of packages that you will still need. If you run the script and PKGNG yells at you because dependencies are still required by other packages, review said dependencies and double check that you will not bork anything. To stop PKGNG complaining, modify this line of the script:
Code:
pkg delete $pkgname
to...:
Code:
pkg delete -f $pkgname
This will force PKGNG to remove the installed packages in question.
Hopefully someone out there has a use for this!