LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to remove a Package including its dependencies.. (http://www.linuxquestions.org/questions/linux-software-2/how-to-remove-a-package-including-its-dependencies-764273/)

thekillerbean 10-24-2009 09:02 PM

How to remove a Package including its dependencies..
 
I recently installed rtorrent on a server in order to download the CentOS 5.4 DVD. I then decided against using this particular server and instead installed it on a different one.

When I initially installed rtorrent, I installed two other packages to satisfy rtorrent's dependencies as shown below:
Code:

Dependencies Resolved

================================================================================
 Package            Arch        Version                  Repository      Size
================================================================================
Installing:
 rtorrent          i386        0.8.4-2.el5.rf            rpmforge        448 k
Installing for dependencies:
 libsigc++20        i386        2.0.17-1.el5.rf          rpmforge        1.8 M
 libtorrent        i386        0.12.4-1.el5.rf          rpmforge        3.6 M

Transaction Summary
================================================================================
Install      3 Package(s)
Update      0 Package(s)
Remove      0 Package(s)

Total size: 5.9 M
Is this ok [y/N]: y

However, when uninstalling, it seems yum will _only_ remove the rtorrent package and leave the other dependencies it installed on my system - obviously taking up HDD space for nought:
Code:

Dependencies Resolved

================================================================================
 Package          Arch        Version                  Repository        Size
================================================================================
Removing:
 rtorrent        i386        0.8.4-2.el5.rf          installed        1.3 M

Transaction Summary
================================================================================
Install      0 Package(s)
Update      0 Package(s)
Remove      1 Package(s)

Is this ok [y/N]:

So, is there another solution (like maybe installing a yum-... package that does this) other than removing the other packages individually?

Tia,
tkb.

thekillerbean 10-24-2009 09:13 PM

On removing the other two packages, I also noticed that if I attempt to remove libsigc++20, it will also remove libtorrent for dependencies:
Code:

Dependencies Resolved

================================================================================
 Package            Arch        Version                  Repository        Size
================================================================================
Removing:
 libsigc++20        i386        2.0.17-1.el5.rf          installed        11 M
Removing for dependencies:
 libtorrent        i386        0.12.4-1.el5.rf          installed        9.3 M

Transaction Summary
================================================================================
Install      0 Package(s)
Update      0 Package(s)
Remove      2 Package(s)

However, removal of libtorrent will not remove libsigc++20:
Code:

Dependencies Resolved

================================================================================
 Package          Arch        Version                  Repository        Size
================================================================================
Removing:
 libtorrent        i386        0.12.4-1.el5.rf          installed        9.3 M

Transaction Summary
================================================================================
Install      0 Package(s)
Update      0 Package(s)
Remove      1 Package(s)

So obviously, if a package installed numerous dependencies (MythTV for instance) and one wanted to remove it, it would be wiser to format and begin again IMO!

I thought yum came along to take care of dependency hell, but it appears it resolves that problem for the install phase but not the uninstall phase! Or maybe, just maybe I'm not aware of a yum-... package that resolves this issue - anyone care to enlighten me, please?


tia,
tkb.


All times are GMT -5. The time now is 03:35 AM.