Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th August 2006, 03:04 PM
wizard Offline
Registered User
 
Join Date: Jun 2004
Location: surreal city, usa
Posts: 98
How to force yum to reinstall a package...

Tripped over this little trick yesterday when a power failure took out libXext and killed gnome and xfce and seriously broke KDE.

Anyway, what you do is remove the package from the rpm database like this:

Code:
rpm -e --justdb --nodeps packagename
then you can use yum to reinstall the package
Reply With Quote
  #2  
Old 14th May 2008, 06:53 AM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 87
Posts: 1,657
Thanks,
one never knows when the search function comes in handy! I have had segmentation faults when using "netstat" and wanted to remove it, but it would have removed all kinds of other stuff (dependencies),
so I used the above command and reinstalled the "net-tools" package with yum....all is well again.
__________________
Ziggy
Reply With Quote
  #3  
Old 23rd June 2008, 02:09 PM
evanfrey Offline
Registered User
 
Join Date: Jun 2008
Posts: 1
Just use yumdownloader

http://linux.die.net/man/1/yumdownloader
Reply With Quote
  #4  
Old 25th June 2008, 06:15 PM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
Posts: 7,909
Some explanation is needed.

--justdb will only update the installed lists in the rpmdb, and not remove any files.

--nodeps will not process dependencies. I normally consider --nodeps to be evil as it can seriously break things by forcing their removal.

yum will never do the equivalent of either of these operations because yum doesn't force things. You only need to force things if they are seriously broken.

When replacing packages in place, I much prefer to use rpm's --force. It will install over even if the same package is installed, without leaving it uninstalled.
Reply With Quote
  #5  
Old 7th July 2008, 12:04 PM
jonathonp Offline
Registered User
 
Join Date: Oct 2006
Location: Melbourne
Age: 43
Posts: 532
Hi jman. can u provide an example for the --force option (forced re-installation of a package). johnny
Reply With Quote
  #6  
Old 8th July 2008, 11:12 PM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 87
Posts: 1,657
Probably like this, as in my case I had a broken "netstat":

Code:
rpm -ivh --force net-tools
You would however need to download the package first, as rpm has no knowledge of repos.
__________________
Ziggy

Last edited by Zigzagcom; 8th July 2008 at 11:15 PM.
Reply With Quote
  #7  
Old 8th July 2008, 11:28 PM
leigh123linux
Guest
 
Posts: n/a
If you are using F9 you can use yum !



Code:
yum reinstall  required_package

i.e


Code:
yum reinstall  firefox
Reply With Quote
  #8  
Old 8th July 2008, 11:32 PM
leigh123linux
Guest
 
Posts: n/a
Quote:
Originally Posted by Jman
Some explanation is needed.

--justdb will only update the installed lists in the rpmdb, and not remove any files.

--nodeps will not process dependencies. I normally consider --nodeps to be evil as it can seriously break things by forcing their removal.

yum will never do the equivalent of either of these operations because yum doesn't force things. You only need to force things if they are seriously broken.

When replacing packages in place, I much prefer to use rpm's --force. It will install over even if the same package is installed, without leaving it uninstalled.

I prefer

Code:
rpm -Uvh --replacefiles --replacepkgs packagename
Reply With Quote
  #9  
Old 9th July 2008, 07:43 AM
jonathonp Offline
Registered User
 
Join Date: Oct 2006
Location: Melbourne
Age: 43
Posts: 532
Thanks for your help leigh and zigzagcom. Nothing worse than uninstalling a package when you really want to reinstall a package since the package for removal may actually be a dependency for other packages which when removed can break the system or reduce it significantly thus requiring a huge re-installation.

The re-installation option is one thing i liked about PC Linux and Ubuntu. If a package was broken it wasn't a big deal to reinstall. I'm glad i can stick with fedora for ease of use. i will put these commands in my tips and tricks notes.
Reply With Quote
  #10  
Old 22nd May 2009, 03:56 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
I am using F10.

Apart from downloading, what difference between
rpm -ivh --force package
and
yum reinstall package?
Reply With Quote
  #11  
Old 22nd May 2009, 05:57 PM
RahulSundaram Offline
Registered User
 
Join Date: May 2005
Posts: 3,725
Hi,

rpm --force <foo> will ignore all the required dependencies for the package foo while yum reinstall foo would not do that.
__________________
Rahul
http://fedoraproject.org/wiki/RahulSundaram
Reply With Quote
  #12  
Old 22nd May 2009, 07:27 PM
aplexpress Offline
Registered User
 
Join Date: May 2009
Posts: 12
thank you.
Reply With Quote
  #13  
Old 22nd May 2009, 08:50 PM
angeltux Offline
Registered User
 
Join Date: May 2009
Posts: 42
thanks a lot buddy

Linux Archive

Last edited by angeltux; 18th June 2009 at 08:42 AM.
Reply With Quote
Reply

Tags
force, package, reinstall, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downgrading and reinstall package patrox Using Fedora 6 7th June 2008 10:20 AM
Can you force yum to install an aready installed package? lmo Installation, Upgrades and Live Media 2 22nd December 2007 04:55 PM
Force install Package how? gold Using Fedora 2 27th August 2007 02:27 PM
Force reinstall from ISO CD...? jack_of_hearts Installation, Upgrades and Live Media 9 2nd March 2006 06:15 AM


Current GMT-time: 15:44 (Thursday, 18-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat