[WBEL-users] How to uninstall an rpm package which has dependencies?
bishop
bishop@platypus.bc.ca
Tue, 09 Nov 2004 03:56:42 -0800
How easily you toss about --nodeps! Oh, the abuse to the RPMdb! That's
the absolute best way to cause yourself all manner of grief. The
number-two way, of course, is to install software by tarball: the RPMdb
'knows' that openssh is version 3.6.1p2, but the software is really
3.9p1. It causes HUGE problems when you're actually building new
software on such a broken system, but even under normal use it causes
the second-most number of calls into the call centre.
Luckily I don't work that call centre; I'd instruct people to
immediately rpm-e their rpm installation, for it's more useless with
each new hand-hacked package some cowboy puts on after that.
(what, you think you'd escape a rant?)
Jean, try using 'yum remove openssh'. It'll remove openssh and
everything which depends on it. At the least, it will tell you which
RPMs you will affect by removing openssh. In this case, the list is short:
> [root@fishy /]# yum remove openssh
> Gathering header information file(s) from server(s)
> Server: White Box Enterprise Linux 3.0 - i386 - Base
> Server: White Box Enterprise Linux 3.0 - i386 - Released Updates
> Finding updated packages
> Downloading needed headers
> xpdf-1-2.02-8.i386.hdr 100% |=========================| 9.6 kB 00:00
> Resolving dependencies
> ...Dependencies resolved
> I will do the following:
> [erase: openssh 3.6.1p2-33.30.1.i386]
> I will erase these to satisfy the dependencies:
> [deps: openssh-server 3.6.1p2-33.30.1.i386]
> [deps: openssh-askpass-gnome 3.6.1p2-33.30.1.i386]
> [deps: openssh-askpass 3.6.1p2-33.30.1.i386]
> [deps: desktop-printing 0.1.10-15.1.i386]
> [deps: netdump 0.6.11-3.i386]
> [deps: kdebase 6:3.1.3-5.4.i386]
> [deps: user-account-cvs 1.2-5.i386]
> [deps: openssh-clients 3.6.1p2-33.30.1.i386]
> Is this ok [y/N]:
You may just want to roll an upgrade RPM for openssh and install that
instead. That way, your upgrade won't cause any complaints.
Well, that's not too hard:
> Wrote: /home/bishop/public_html/apt/i386/wb30/SRPMS.extras/openssh-3.9p1-1.src.rpm
> Wrote: /home/bishop/public_html/apt/i386/wb30/RPMS.extras/openssh-3.9p1-1.i386.rpm
> Wrote: /home/bishop/public_html/apt/i386/wb30/RPMS.extras/openssh-clients-3.9p1-1.i386.rpm
> Wrote: /home/bishop/public_html/apt/i386/wb30/RPMS.extras/openssh-server-3.9p1-1.i386.rpm
> Wrote: /home/bishop/public_html/apt/i386/wb30/RPMS.extras/openssh-askpass-3.9p1-1.i386.rpm
> Wrote: /home/bishop/public_html/apt/i386/wb30/RPMS.extras/openssh-askpass-gnome-3.9p1-1.i386.rpm
Mind you, I haven't examined, compared or tested this RPM, but I did
hand-assess the patches and it did roll something valid. Now all I need
is the chroot patch. Here are the ones I found; which are you using?
- homedir /home/./username patch
> http://chrootssh.sourceforge.net/download/osshChroot-3.9p1.diff
- chrootuser config option
> http://majikal.dyn.dhs.org/projekts/openssh_chroot_patch/openssh-3.5p1+chroot.patch
Let me know and I'll have something for you to test soon afterward.
- bish
Graham Purcocks wrote:
> No nothing wrong. You can't uninstall openssh as the packages it
> mentions depends on it. So you either force uninstall or remove the
> dependant packages as well at the same time. I suspect you want the
> first. Use --nodeps.
>
> Try reading 'man rpm' on the section on ERASEING packages. This may give
> you more insight.
>
> Hope this helps
>
> Jean Lee wrote:
>
>> Hello all,
>>
>> I think that what I want is not so hard but I really don't know how to
>> do it.
>>
>> My problem is that I want to unintsall openssh-3.6.1p2 which is
>> installed as an rpm package and then install openssh-3.9p1-chroot
>> which is a tarball (it is a patched version of Openssh-3.9p1 with
>> added chroot functionnality).
>>
>> Well, I tried first to uninstall openssh-3.6.1p2 with :
>> rpm -e openssh
>> and this command failed due to dependencies to other packages :
>> openssh-server, openssh-client, netdump and a few others related to
>> openssh...
>>
>> I'm sure that I am doing something wrong. Perhaps that I can firstly
>> uninstall the packages related to openssh but the one with netdump is
>> probably not recommended.. Moreover, I tried to uninstall
>> openssh-server and it failed due to a dependency to netdump-server.
>>
>> What is the right way? Do I have really to uninstall every package
>> which has a dependency before uninstalling openssh or is there another
>> way which ensure that nothing will be broken?
>>
>> Thanks for any help,
>>
>> Jean
>> _______________________________________________
>> Whitebox-users mailing list
>> Whitebox-users@beau.org
>> http://beau.org/mailman/listinfo/whitebox-users
--
To announce that there must be no criticism of the President, or
that we are to stand by the President, right or wrong, is not
only unpatriotic and servile, but is morally treasonable to the
American public. - Teddy Rooseveldt, 1918