title: Erase multiple packages using rpm or yum
body: <p>I was given access to a server with 50+ php rpms installed. I'm trying to remove them all.</p>
  
  <p>Basically, I'm trying to combine these two commands:</p>
  
  <pre><code>rpm -qa | grep 'php'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>rpm --erase
  </code></pre>
  
  <p>I know a little about pipes and redirection, but I don't see how to use them for this purpose. Please help.</p>