LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Removing a Package without removing Dependency using RPM (https://www.linuxquestions.org/questions/linux-software-2/removing-a-package-without-removing-dependency-using-rpm-4175577861/)

sathish6105 04-19-2016 03:06 PM

Removing a Package without removing Dependency using RPM
 
Hi All,

Im trying to remove a package which is not needed,

but it seems to be deleting the dependent package which uses the file from the package.

please see below the output, it should not delete either the .so file or the package like gnome-vfs2-smb,gvfs-smb



[root@xxxxx ssea1]# rpm -e --test libsmbclient
error: Failed dependencies:
libsmbclient.so.0()(64bit) is needed by (installed) gnome-vfs2-smb-2.24.2-6.el6.x86_64
libsmbclient.so.0()(64bit) is needed by (installed) gvfs-smb-1.4.3-18.el6.x86_64
libsmbclient >= 3.0.8-0.pre1.3 is needed by (installed) gnome-vfs2-smb-2.24.2-6.el6.x86_64


does nodeps really works? example: rpm -e --nodeps <package>

in the manpage it is given as below, it means to be deleting the .so files which are needed by other packages.


--nodeps
Don’t check dependencies before uninstalling the packages.



Thanks
Sathish

TB0ne 04-20-2016 07:32 AM

Quote:

Originally Posted by sathish6105 (Post 5533600)
Hi All,
Im trying to remove a package which is not needed, but it seems to be deleting the dependent package which uses the file from the package. please see below the output, it should not delete either the .so file or the package like gnome-vfs2-smb,gvfs-smb

[root@xxxxx ssea1]# rpm -e --test libsmbclient
error: Failed dependencies:
libsmbclient.so.0()(64bit) is needed by (installed) gnome-vfs2-smb-2.24.2-6.el6.x86_64
libsmbclient.so.0()(64bit) is needed by (installed) gvfs-smb-1.4.3-18.el6.x86_64
libsmbclient >= 3.0.8-0.pre1.3 is needed by (installed) gnome-vfs2-smb-2.24.2-6.el6.x86_64

does nodeps really works? example: rpm -e --nodeps <package> in the manpage it is given as below, it means to be deleting the .so files which are needed by other packages.

--nodeps
Don’t check dependencies before uninstalling the packages.

Both the man page and the documentation on the RPM website tell you that the --nodeps flag does exactly what you're after. But again, the system is doing what you TELL IT to , and that is, removing that one package...and it will break those OTHER packages. The fact that it's telling you that those other packages will be broken, means what you're trying to delete IS NEEDED. You can't selectively keep a few files out of a package.

rknichols 04-20-2016 09:11 AM

What is the problem you are actually trying to solve? Your question sounds like an "X-Y Problem".

sathish6105 04-22-2016 05:48 AM

And it will break those other packages.. Ok got it tbone.

Let me know if those .so files can be saved before removing main rpm and then be used to fix the broken packages.

TB0ne 04-22-2016 09:44 AM

Quote:

Originally Posted by sathish6105 (Post 5534956)
And it will break those other packages.. Ok got it tbone.

Let me know if those .so files can be saved before removing main rpm and then be used to fix the broken packages.

No, they CANNOT, unless you copy them manually. And what you're trying to do is an absolutely BAD IDEA. RPM and package managers work for a REASON...leaving junk laying around with no package that it references is only going to lead to trouble. Try to think about it....what happens when those packages you KEEP get updated? That's right...they WON'T...because something they DEPEND ON is not in the package database, and even IF the package gets updated, the new program will be looking at OLD libraries, which will cause all sorts of problems.

Either remove them ALL or leave them there.

DavidMcCann 04-22-2016 10:49 AM

Why do you want to remove it in the first place? Linux is not Windows: there's no registry, so having things you don't use doesn't trouble the system in any way.


All times are GMT -5. The time now is 02:46 AM.