Hi,
I have a 64-bit RHEL 5.5. In order to make a particular product work I want to uninstall some rpms which is specific to 64 bit. Wondering if anyone has a way how to remove the 64-bit rpm without disturbing the i386 rpms.
What I find when I googled is all are removing forcefully, but sometimes doing this makes the system very unstable. Wondering if anybody has tried this possibility of just removing a particular rpm without disturbing the other architectures.
Thanks,
Dinesh
mirni
May 26, 2011, 8:35pm
2
I suggest you use yum:
$ yum list installed 'znc*'
Loaded plugins: fastestmirror, kernel-module, priorities
Reducing CentOS-5 - Plus to included packages only
Finished
Installed Packages
znc.x86_64 0.098-1.el5 installed
znc-devel.i386 0.098-1.el5 installed
znc-devel.x86_64 0.098-1.el5 installed
$ sudo yum remove znc-devel.x86_64
--> Running transaction check
---> Package znc-devel.x86_64 0:0.098-1.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
znc-devel x86_64 0.098-1.el5 installed 234 k
Transaction Summary
================================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : znc-devel 1/1
Removed:
znc-devel.x86_64 0:0.098-1.el5
Complete!
$ yum list installed 'znc*'
Loaded plugins: fastestmirror, kernel-module, priorities
Reducing CentOS-5 - Plus to included packages only
Finished
Installed Packages
znc.x86_64 0.098-1.el5 installed
znc-devel.i386 0.098-1.el5 installed
Just be careful not to remove a bunch of dependencies that other packages may depend on.
Same thing can be done with rpm. In this example
$ sudo rpm -e znc-devel.x86_64
Find the rpm list with Arch using the below one.
sudo /bin/rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}-%{arch}\n"
And remove the rpm which u need using
sudo /bin/rpm -q pkgname.arch
hope this will help for ur issue.