<---- template headericclude ----->
How to force yum to reinstall a package...
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 13 of 13
  1. #1
    wizard Guest

    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

  2. #2
    Join Date
    Feb 2005
    Location
    CALIFORNIA, yeah
    Age
    97
    Posts
    1,657
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    evanfrey Guest

  4. #4
    Jman Guest
    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.

  5. #5
    Join Date
    Oct 2006
    Location
    Melbourne
    Age
    52
    Posts
    603
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi jman. can u provide an example for the --force option (forced re-installation of a package). johnny

  6. #6
    Join Date
    Feb 2005
    Location
    CALIFORNIA, yeah
    Age
    97
    Posts
    1,657
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Last edited by Zigzagcom; 8th July 2008 at 11:15 PM.
    Ziggy

  7. #7
    leigh123linux Guest
    If you are using F9 you can use yum !



    Code:
    yum reinstall  required_package

    i.e


    Code:
    yum reinstall  firefox

  8. #8
    leigh123linux Guest
    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

  9. #9
    Join Date
    Oct 2006
    Location
    Melbourne
    Age
    52
    Posts
    603
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  10. #10
    Join Date
    May 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using F10.

    Apart from downloading, what difference between
    rpm -ivh --force package
    and
    yum reinstall package?

  11. #11
    Join Date
    May 2005
    Posts
    3,868
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  12. #12
    Join Date
    May 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you.

  13. #13
    Join Date
    May 2009
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot buddy

    Linux Archive
    Last edited by angeltux; 18th June 2009 at 08:42 AM.

Similar Threads

  1. Downgrading and reinstall package
    By patrox in forum Using Fedora
    Replies: 6
    Last Post: 7th June 2008, 10:20 AM
  2. Can you force yum to install an aready installed package?
    By lmo in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 22nd December 2007, 05:55 PM
  3. Force install Package how?
    By gold in forum Using Fedora
    Replies: 2
    Last Post: 27th August 2007, 02:27 PM
  4. Force reinstall from ISO CD...?
    By jack_of_hearts in forum Installation, Upgrades and Live Media
    Replies: 9
    Last Post: 2nd March 2006, 07:15 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]