Reputation: 53
probably a quick question for experts. on linux(Centso)
I did something like
$ yum list | grep cdh
which returns a bunch of items(I was search to remove cloudera packages)
I know that I can remove them by
$ yum remove ...
but certainly like to do it in one command. Is there a way to do so? many thanks
currently. I manually output the list result to a text file, and then copy/paste the names into yum remove. there must be a better way. thanks
Upvotes: 1
Views: 7760
Reputation: 1
You can remove in bulk by using a wildcard.
yum remove 'cdh*'
There is more information here rpm - erase multiple packages
Upvotes: 0
Reputation: 80931
yum remove '*cdh*'
will do what you want. Though be careful to check the list of packages it wants to remove to make sure the pattern didn't catch too much.
Upvotes: 1