Remove multiple same rpm packages

rpm -e --allmatches filename.rpm
If somehow if you get more than 1 same name rpm package install, then it cannot be removed by using simple rpm -e as it gives you more than one rpm matches error. The --matches will help to remove all the same name rpm packages.

1
By: sohaileo
2009-02-12 23:09:24
rpm

These Might Interest You

  • After you install/remove lots of packages, there are many packages marked with 'rc'. This script help you to purge these packages, it will save some spaces from your disk.


    2
    sudo dpkg --purge `dpkg -l | awk '/^r/{print $2}'`
    elleryq · 2009-02-16 02:18:02 3
  • Shows the packages installed on your system that are recomemnded by other packages. You should remove these packages. Show Sample Output


    1
    aptitude search '?and( ?automatic(?reverse-recommends(?installed)), ?not(?automatic(?reverse-depends(?installed))) )'
    wei2912 · 2012-07-28 05:45:21 0
  • If you creates a virtualenv just for a test, and at the end, wants remove all installed packages. This is the lever. Show Sample Output


    0
    for i in $(pip freeze | awk -F== '{print $1}'); do pip uninstall $i; done
    maurobaraldi · 2014-02-17 21:38:49 0
  • Linux : these script enable you to edit multiple files and remove exact phrase from multiple files


    -3
    grep -r "mystring" . |uniq | cut -d: -f1 | xargs sed -i "s/mystring//"
    mohamednasr2000 · 2009-04-09 12:49:01 4

What Others Think

Exactly as I needed last night with VLC Media player
unixmonkey659 · 484 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: