Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Centos 6 server and I have upgraded several packages. I can, supposedly, downgrade them with yum history undo <packageName> but all I get is downgrade failed for every single package.

In the documentation it says that it downgrades if there is an older version in the repositories. So my question is: Which repositories? Obviously the ones I have, include the latest versions. How can I configure such a thing?

In my repolist the only repos enabled are:

Centos-6 - Base
Extra Packages for Enterprise Linux 6 - x86_64
Extra Packages for Enterprise Linux 6 - Testing - x86_64 - Source
CentOS-6 - Extras
CentOS-6 - Updates

Thank you

share|improve this question
    
Those are the repositories. – Michael Hampton Mar 12 '13 at 9:22
    
But then why can't I undo? How come every downgrade fails? – idipous Mar 12 '13 at 9:29
1  
Hm, then perhaps you should edit your question. We can't see your screen nor read your mind, so we don't know what you're seeing. – Michael Hampton Mar 12 '13 at 9:43
    
What additional information would you like. I would be happy to provide them. The issue is that when I do yum history undo #transID it doesn't undo the update. – idipous Mar 12 '13 at 9:58
    
You can copy and paste, right? – Michael Hampton Mar 12 '13 at 10:01

Note

yum history undo takes transaction id (not package name) as an argument and clearly communicates that to you if you get it wrong

Bad transaction ID given
Error: Failed history undo

but since you got Failed to downgrade message, I'm going to assume that's just a typo and you do have transaction id from yum history list.

Answer

This is likely due to archive repository being disabled. For example, CentOS uses CentOS-Vault.repo to hold packages from previous releases while Webtatic uses webtatic-archive.repo.

To see all installed (not just enabled) repositories:

ls -la /etc/yum.repos.d/

Find appropriate <archive_repository>.repo for your failed package(s), set enabled=1 and roll back your transaction:

yum history undo <transaction_id>
share|improve this answer
    
I don't have access to the server anymore. Thanks for taking the time to respond however. I will test this when I get the first opportunity and let you know how it went. – idipous Apr 12 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.