I was given access to a server with 50+ php rpms installed. I\'m trying to remove them all.
Basically, I\'m trying to combine these two commands:
rpm -qa
The usual tool for this job is xargs:
rpm -qa | grep 'php' | xargs rpm -e
This will call rpm -e with all packages named in the standard input of xargs as arguments.
rpm -e
xargs