Erase multiple packages using rpm or yum

后端 未结 5 999
故里飘歌
故里飘歌 2021-02-01 23:17

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         


        
5条回答
  •  逝去的感伤
    2021-02-01 23:43

    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.

提交回复
热议问题