systemadmin.es > Utilidades > yum history en CentOS 6

yum history en CentOS 6

Con la nueva versión de CentOS, yum también trae mejoras en lo referente al control de los paquetes instalados.

Anteriormente, para buscar los paquetes instalados recientemente debíamos buscar en el fichero yum.log:

# zcat yum.log-20130101.gz 
Dec 05 06:00:04 Updated: libxml2-2.7.6-8.el6_3.4.x86_64
Dec 12 06:00:04 Updated: 32:bind-libs-9.8.2-0.10.rc1.el6_3.6.x86_64
Dec 12 06:00:04 Updated: 32:bind-utils-9.8.2-0.10.rc1.el6_3.6.x86_64
(...)

A partir de CentOS 6, yum incluye el comando history que lo permite ver de una forma mucho más clara al presentar-se como acciones conjuntas en lugar de instalaciones individuales de paquetes:

# yum history
Loaded plugins: fastestmirror
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    35 | root <root>              | 2012-11-21 06:00 | Update         |    4   
    34 | root <root>              | 2012-11-14 06:00 | Update         |    5   
    33 | root <root>              | 2012-11-08 11:58 | Install        |   10   
    32 | root <root>              | 2012-11-08 11:58 | Install        |    1   
    31 | root <root>              | 2012-11-08 11:58 | Install        |    2   
    30 | root <root>              | 2012-11-08 11:58 | Install        |    1   
    29 | root <root>              | 2012-11-08 11:57 | Install        |   13   
    28 | root <root>              | 2012-11-07 06:00 | Update         |    3   
    27 | root <root>              | 2012-11-07 05:00 | Update         |    4   
    26 | root <root>              | 2012-11-05 12:27 | Install        |    1   
    25 | root <root>              | 2012-11-05 09:49 | Install        |    1   
    24 | root <root>              | 2012-10-31 15:14 | Install        |    5   
    23 | root <root>              | 2012-10-31 14:24 | Install        |    7   
    22 | root <root>              | 2012-10-31 14:23 | Install        |    2   
    21 | root <root>              | 2012-10-31 14:22 | Install        |    2   
    20 | root <root>              | 2012-10-31 11:59 | Install        |    1   
    19 | root <root>              | 2012-10-31 11:59 | Install        |    3  <
    18 | root <root>              | 2012-10-31 11:54 | Install        |    6 > 
    17 | root <root>              | 2012-10-31 11:54 | Install        |    1   
    16 | root <root>              | 2012-10-31 11:54 | Install        |    1   
history list

Dentro de esta nuevo comando tenemos otros subcomandos, el subcomando por defecto es list:

# yum history help
Loaded plugins: fastestmirror
Invalid history sub-command, use: list, info, summary, repeat, redo, undo, new, rollback, addon, addon-info, stats, statistics, sync, synchronizepkg, pkgs, pkg-list, pkgs-list, package, package-list, packages, packages-list, pkg-info, pkgs-info, package-info, packages-info.

Por ejemplo, mediante summary podemos ver un resumen:

# yum history summary
Loaded plugins: fastestmirror
Login user                 | Time                | Action(s)        | Altered 
-------------------------------------------------------------------------------
root <root>                | Last 2 weeks        | Update           |        1
System <unset>             | Last 3 months       | Install          |      209
root <root>                | Last 3 months       | I, U             |      169
history summary

Y mediante info podemos ver más información sobre una acción en concreto que vemos en el yum history list:

# yum history info 26
Loaded plugins: fastestmirror
Transaction ID : 26
Begin time     : Mon Nov  5 12:27:40 2012
Begin rpmdb    : 283:a2ab0492bc652f14faae78f3183330ec8b6fca85
End time       :                          (0 seconds)
End rpmdb      : 284:e23292ecc6d788eb325b6a78f103fb08d8618b96
User           : root <root>
Return-Code    : Success
Command Line   : install dmidecode -y
Transaction performed with:
    Installed     rpm-4.8.0-27.el6.x86_64                       @anaconda-CentOS-201207061011.x86_64/6.3
    Installed     yum-3.2.29-30.el6.centos.noarch               @anaconda-CentOS-201207061011.x86_64/6.3
    Installed     yum-plugin-fastestmirror-1.1.30-14.el6.noarch @anaconda-CentOS-201207061011.x86_64/6.3
Packages Altered:
    Install dmidecode-1:2.11-2.el6.x86_64 @base
history info

Deja un comentario:

XHTML - Tags permitidos:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>