How to remove yum packages without dependencies

Posted in Linux

I can’t figure out how to make yum ignore dependencies and I can’t find it by googling either. The yum-allowdowngrade package doesn’t do what I expected it to do. So I’ll just have to ignore yum for now and force rpm to do the job. Yum will be fine with this, it will not break at all. Yum will reflect the new versions after the splice, so it doesn’t matter that you’re not calling yum to do this.

# rpm -qa | grep gtk2

pygtk2-codegen-2.12.0-2.fc11
pygtk2-libglade-2.12.0-2.fc11
pygtk2-devel-2.12.0-2.fc11
gtk2-devel-2.12.8-2.fc11
gtk2-2.12.8-2.fc11
gtk2-2.12.8-2.fc11
pygtk2-2.12.0-2.fc11
gtk2-engines-2.12.2-1.fc11
gtk2-engines-2.12.2-1.fc11
gtk2-devel-2.12.8-2.fc11

I need to downgrade gtk2 and gtk2-devel packages without touching anything else. If I were a doctor, downgrading through yum would be the equivalent of performing a heart transplant to fix heart burn.

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

Is this ok [y/N]: no!

So i’ll just remove the 32 bit and 64 bit gtk2 packages manually without processing dependencies. You should not get any standard output from these commands, just right back to your prompt. If you’re really worried, echo the $? variable to make sure you got a return value of zero right after each rpm command.

# rpm -e –nodeps gtk2.i386

# rpm -e –nodeps gtk2.x86_64

# rpm -ivh gtk2-2.12.3-3.fc11.i386.rpm

Preparing...                ########################### [100%]
   1:gtk2                   ############################ [100%]

# rpm -ivh gtk2-2.12.3-3.fc11.x86_64.rpm

Preparing...                ########################### [100%]
   1:gtk2                   ############################ [100%]

# rpm -e –nodeps gtk2-devel.i386

# rpm -e –nodeps gtk2-devel.x86_64

# rpm -ivh gtk2-devel-2.12.3-3.fc11.i386.rpm

Preparing...                ############################ [100%]
   1:gtk2-devel             ############################ [100%]

# rpm -ivh gtk2-devel-2.12.3-3.fc11.x86_64.rpm

Preparing...                ############################ [100%]
   1:gtk2-devel             ############################ [100%]

The new versions show up when I ask yum to list the packages. All is good.

# yum list installed | grep gtk2

gtk2.x86_64                              2.12.3-3.fc11          installed
gtk2.i386                                2.12.3-3.fc11          installed
gtk2-devel.i386                          2.12.3-3.fc11          installed
gtk2-devel.x86_64                        2.12.3-3.fc11          installed
Posted by admica   @   8 April 2009

Related Posts

2 Comments

Comments
Apr 18, 2009
12:51 am

this is exactly the post I needed to see!

May 27, 2009
3:37 pm
#2 Russ :

Thank you! I searched and searched on doing this as well, until I found this. I never bother upgrading from FC8, and now I have to do it remotely , and the dependency’s were killing me.

Exactly what I was looking for!

Leave a Comment

Name

Email

Website

Previous Post
« Looping over a range in bash
Next Post
Reinstall customized RPMs with repackage and rollback »
Powered by Wordpress   |   Lunated designed by ZenVerse