LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-23-2011, 08:23 PM   #1
k9krew
LQ Newbie
 
Registered: Aug 2011
Location: Fort McMurray, Alberta, Canada
Distribution: CentOS
Posts: 3

Rep: Reputation: Disabled
Can I selectively erase using YUM (ignore dependencies)?


Hi,
I was just looking through what I have installed on my VPS (CentOS 5.5), and noticed that PostgreSQL is installed and I do not use it so I ran 'yum erase postgresql' and received the following...

Dependencies Resolved

==================================================================
Package Arch Version
==================================================================
Removing:
postgresql i386 8.1.23-1.el5_6.1
Removing for dependencies:
postfix i386 2:2.3.3-2.3.centos.mysql_pgsql

... I am using postfix with MySQL support for email, so I do not want to remove this 'dependency'... my conundrum is how to remove postgresql without removing postfix (tried -x postifx; did not work).

Any Suggestions Welcome
Ian
 
Old 08-23-2011, 08:36 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Since postgresql-8.1.23 is a dependency of postfix-2.3.3, no you can't.

You either have to live with postgresql or you have to rebuild postfix so it does not require postgresql.
 
1 members found this post helpful.
Old 08-23-2011, 08:40 PM   #3
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 257

Rep: Reputation: 58
You can try doing rpm -e --nodeps postgresql

The question is will postfix mysql-pgsql still run.

Looking on CentOS 6, don't see that package.

Note that using --nodeps can be dangerous and break things. However, you can remove it, then see if postfix works without problems. If it does, then fine, if not, reinstall it.

A handy command is

rpm -q --whatrequires

For example, I see I also have postgresql-libs installed. Not sure what pulled it in.

However, if I run

rpm -q --whatrequires postgresql-libs I get an answer that nothing requires it.

Yet, if I run yum remove postgresql-libs, it wants to remove openoffice and several other packages.

RH is a rather bloated distribution, and tends to throw in the kitchen sink--I remember once, trying to remove wireless-tools and yum wanted to remove a bunch of things that have no connection with it, IIRC, probably everything network connected. While --nodeps can, as I said, be quite dangerous at times, other times it's quite safe to do so.

Last edited by scottro11; 08-23-2011 at 08:51 PM.
 
1 members found this post helpful.
Old 08-23-2011, 10:25 PM   #4
k9krew
LQ Newbie
 
Registered: Aug 2011
Location: Fort McMurray, Alberta, Canada
Distribution: CentOS
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks, question answered

Thanks Andrew, you're 100% correct.

Thanks Scott, I ran rpm -q --whatrequires postgresql-libs & sure enough postfix is returned.
 
Old 08-24-2011, 08:12 AM   #5
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 257

Rep: Reputation: 58
Thanks for giving us the followup. In that case, don't do the --nodeps, as we see, apparently, anyway, it would have broken things.

One interesting thing that I found after posting was that although whatrequires said nothing needed postgresql-libs (on CentOS 6), when I went to remove it, not by yum, but by rpm -e, I would then get an error message of failed dependencies, that a particular library it supplied was needed by another, completely unrelated program.


This is another thing that RH seems to do more often than others, and another reason why using --nodeps can be dangerous. Program A needs shared object B, which is provided by completely unrelated program C. So, A will pull in C, just because C is the only thing that provides shared object B. I don't know how much of this is due to bad or sloppy packaging and how much is really the best way, but it's another reason one winds up with so many odd dependencies, that have nothing to do with the kitchen sink attitude.
 
  


Reply

Tags
postfix, postgresql, yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
erase package with its dependencies RudraB Linux - Newbie 1 09-01-2010 03:56 PM
DPKG, please ignore dependencies... lectraplayer Debian 6 05-31-2007 09:56 AM
Ignore apt-get dependencies? pdeman2 Linux - Software 7 05-23-2006 08:08 PM
how to make apt-get ignore errors or dependencies? hisnumber666 Linux - Software 5 05-03-2006 07:01 PM
Which program help ignore rpm dependencies Mojojo Linux - Software 2 06-16-2003 04:56 AM


All times are GMT -5. The time now is 09:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration