How to remove a batch of packages without pulling your hair out
Friday Jan 20, 2006
So, I wanted to remove all of the blastwave packages I had installed on my system. Fortunately, all of their packages start with the CSW prefix (as opposed to SUNW which Sun itself uses). A couple of lines of shell later and we have:
First create a list of installed blastwave packages
# pkginfo | grep CSW | awk '{ print $2 }' > cswpkgs.list
Now, remove them
# yes | pkgrm `cat cswpkgs.list`
Every single blastwave package will be uninstalled and what's better is you won't be prompted for each and every package to confirm that you do in fact want to remove the package.











# yes | pkgrm `pkginfo... | grep CSW | awk '{print $2}'`