 |
 |
 |
 |
| 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. |

6th August 2006, 03:04 PM
|
|
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
|

14th May 2008, 06:53 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
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
|

23rd June 2008, 02:09 PM
|
|
Registered User
|
|
Join Date: Jun 2008
Posts: 1

|
|
|
Just use yumdownloader
|

25th June 2008, 06:15 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
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.
|

7th July 2008, 12:04 PM
|
 |
Registered User
|
|
Join Date: Oct 2006
Location: Melbourne
Age: 41
Posts: 528

|
|
|
Hi jman. can u provide an example for the --force option (forced re-installation of a package). johnny
|

8th July 2008, 11:12 PM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
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.
|

8th July 2008, 11:28 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
If you are using F9 you can use yum !
Code:
yum reinstall required_package
i.e
Code:
yum reinstall firefox
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
|

8th July 2008, 11:32 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
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
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
|

9th July 2008, 07:43 AM
|
 |
Registered User
|
|
Join Date: Oct 2006
Location: Melbourne
Age: 41
Posts: 528

|
|
|
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.
|

22nd May 2009, 03:56 PM
|
|
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?
|

22nd May 2009, 05:57 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3,549

|
|
|
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
|

22nd May 2009, 07:27 PM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 12

|
|
|
thank you.
|

22nd May 2009, 08:50 PM
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 16:48 (Monday, 20-05-2013)
|
|
 |
 |
 |
 |
|
|