Kunaljain's Weblog

February 10, 2009

Removing RPM packages

Filed under: Linux Tips & Tricks,MySql — Kunal Jain @ 04:14
Tags: ,

Try to remove MySQL from my server which my datacenter guys installed it along with the OS and while doing that i got the following error

shell> rpm -aq | grep mysql | xargs rpm -e

error: “mysql-devel-5.0.45-7.el5” specifies multiple packages
error: “mysql-5.0.45-7.el5” specifies multiple packages
error: “mysql-devel-5.0.45-7.el5” specifies multiple packages
error: “mysql-5.0.45-7.el5” specifies multiple packages

Then i google about this error and with some help from google and rpm manual i use the following command to remove MySQL from my server

shell > rpm -aq | grep mysql | xargs rpm -e --nodeps --allmatches
Advertisements

4 Comments »

  1. Good one! Thanks for that.

    Comment by Travis — November 27, 2009 @ 17:50 | Reply

  2. Thank you for that

    Comment by jay — February 25, 2010 @ 13:11 | Reply

  3. Hey! Thanks a lot. I have one query for what “xargs” and “–nodep” stands for ? Have seen in the manual of rpm but couldn’t get it.
    Would you please let me know?

    Thanks,
    ~nikhil

    Comment by Nikhil — December 29, 2010 @ 03:38 | Reply

    • xargs basically build and execute command lines from standard input. you can check out he manual for xargs (man xargs) and –nodeps – Dont do a dependency check before Installing/Upgrading/Removing a package.

      Comment by Kunal Jain — December 29, 2010 @ 06:14 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: