1820483 Members
2379 Online
109624 Solutions
New Discussion юеВ

linux rpm command

 
Michael Murphy_2
Frequent Advisor

linux rpm command

newbie question - is there an option to see if there is a certain version OR NEWER of a package? I know you can use rpm -q - but is there a way to list all versions or versions at a certain level or newer? THanks
5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: linux rpm command

You can use:

rpm -qa |grep

This will obtain the package version. You can identify if the version is the required from the result of that command.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: linux rpm command

Shalom,

rpm packaging overwrites the previous verion of the package in most cases, leaving no trace of the previous version. Thats what up2date does, which issues an rpm -Uvh or -Fvh to install the newer package.

Ivan's command will work, if indeed the package is there.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
George Liu_4
Trusted Contributor

Re: linux rpm command

e.g.,

up2date -l kernel*

shows your current installed kernel-* verison and newer version available

Siert Zijl
Advisor

Re: linux rpm command

Depends on your distro & repository type.

If you'are using a yum based distro like Fedora or Red Hat Enterprise Linux >= 5, you can use 'yum check-update' or 'yum list '

For Red Hat 2.1/3.0/4.0 you can use:
'up2date -l package' as George said before.

If you're running SuSE you might want to try the yast utility.
Linux system administrator
Huc_1
Honored Contributor

Re: linux rpm command

Also in the
/var/log/rpmpkgs
you will find what rpm are installed, but there is normaly also some /var/log/rpmpkgs.1
/var/log/rpmpkgs.2 /var/log/rpmpkgs.'x'

theses files are rotated by logrotate and the number of version in the /var/log and rate at which the files are created is set by the conf file. /etc/logrotate.conf

This can sometimes be usefull if to find the package that have 'recently' been updated...and the 'old' previous version.

like ex:

# diff /var/log/rpmpkgs /var/log/rpmpkgs.1
# diff /var/log/rpmpkgs /var/log/rpmpkgs.2
# diff /var/log/rpmpkgs /var/log/rpmpkgs.'x'

sometime /var/log/messages and messages.1 etc can also be usefull

enjoy life.

Jean-Pierre Huc
Smile I will feel the difference