Erase multiple packages using rpm or yum

Viewed 43883

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 | grep 'php'

and

rpm --erase

I know a little about pipes and redirection, but I don't see how to use them for this purpose. Please help.

5 Answers
Related