Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have identified the rpm to uninstall which is the following:

mysql-5.0.77-4.el5_6.6

I run the following rpm command to uninstall it:

rpm -e mysql-5.0.77-4.el5_6.6

Then I receive a dependency error, basically saying that it cant remove this rpm because it has a dependancy on the rpm exim-4.63-10.el5.x86_64. see error below:

libmysqlclient.so.15()(64bit) is needed by (installed) exim-4.63-10.el5.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) exim-4.63-10.el5.x86_64

I then looked up what exim-4.63-10.el5.x86_64 actually is and determined that its a email application similar to sendmail. So I attempted to uninstall it and received some other dependency errors.

Is there a way to have the rpm command ignore the dependency or am i approaching this the wrong way. Any insight would be greatly appreciated.

Thanks!

share|improve this question

4 Answers 4

up vote 3 down vote accepted

Any reason not to use Yum?

yum erase mysql will resolve the dependencies and show you every thing it would need to remove.

share|improve this answer
    
Well that did work quite cleanly! –  Doug Aug 29 '12 at 19:52

You can tell RPM to ignore dependencies and just rip stuff out with the --nodeps flag. I've had to do it in some cases, but make sure you reeeally understand what's depending on those packages.

Another neat trick is to run rpm -qa|grep <thing you want to uninstall>|xargs rpm -e, that will remove all of the packages with "thing you want to uninstall" in the name. I;ve found a lot of times this helps alleviate dependencies if they're all related to the same install.

share|improve this answer
    
Nice command! I appreciate it.. It looks like its all pointing back to sendmail.. this is strictly going to be a db server but just wanted to start with a fresh install. –  Doug Aug 29 '12 at 19:41
1  
No prob, just an fyi, if you still need it, --nodeps, or sometimes also, the --allmatches flag, they go at the end of that last command after -e - jus tin case people who find this don't already know. –  John K Aug 29 '12 at 19:43

Try with:

yum remove mysql mysql-server
share|improve this answer

If you really wanted to remove an rpm without checking dependencies you can always use the --nodeps flag like so:

rpm -e mysql-5.0.77-4.el5_6.6 --nodeps

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.