Sunday, July 24, 2011

yum - help I have broken my install

Yes it happens from time to time - you do a yum update to get the latest packages for the fedora distribution or you install a new package which breaks your system.  The good news is that there is a record kept of what you have installed/updated.
You can look at the yum.log in /var/log/ which will show you what packages have been updated/erased with yum.

You can also use the yum history command to see what has been happening

yum history
Loaded plugins: langpacks, presto, refresh-packagekit
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
   138 |  <fred>                  | 2011-07-24 11:24 | Update         |   25 EE
   137 | root <root>              | 2011-07-24 11:08 | Downgrade      |   21 EE
   136 | root <root>              | 2011-07-24 11:04 | Downgrade      |    4  
   135 | root <root>              | 2011-07-24 10:36 | Update         |    4  
   134 |  <
fred>                  | 2011-07-23 13:25 | Update         |   55 EE
   133 |  <
fred>                  | 2011-07-17 12:00 | I, U           |   71  
   132 |  <
fred>                  | 2011-07-10 15:06 | Install        |    1  
   131 |  <
fred>                  | 2011-07-10 15:06 | Install        |    1  
   130 |  <
fred>                  | 2011-07-10 15:06 | Install        |    2  

You can then use yum history undo <number> to rollback any update.
You can see that step 136 and 137 are a result of this - I uninstalled the previous two upgrades when trying to debug a startup issue


Other handy commands

yum history info <nnn>
yum history redo <nnn>