Difference between revisions of "Check the Version of Package"
(Created page with "==Check the Version of an Installed Package/Software== From time to time, you will find yourself needing to know which package you are currently running. You can do this in ...") |
(No difference)
|
Revision as of 11:42, 16 October 2013
Check the Version of an Installed Package/Software
From time to time, you will find yourself needing to know which package you are currently running. You can do this in one of two ways, rpm or yum.
Every time a package is installed, upgraded, or erased, the changes are logged in RPM's database. It's necessary for RPM to keep track of this information; otherwise it wouldn't be able to perform these operations correctly. You can think of the RPM database (and the disk space it consumes) as being the "price of admission" for the easy package management that RPM provides.
Use RPM to check Package Version
Lets say you need to check what version of httpd you are currently running.
Now you can use RPM to figure this information out run the following
rpm -qa | grep httpd
You should get something like
httpd-2.2.15-29.el6.centos.x86_64 httpd-tools-2.2.15-29.el6.centos.x86_64
Now you know you are running version 2.2.15-29.
Use YUM to check Package Version
To accomplish the same objective, you would type
yum info httpd
You should get something like
Installed Packages Name : httpd Arch : x86_64 Version : 2.2.15 Release : 29.el6.centos Size : 2.9 M Repo : installed From repo : updates Summary : Apache HTTP Server URL : http://httpd.apache.org/ License : ASL 2.0 Description : The Apache HTTP Server is a powerful, efficient, and extensible web server.
Sometimes, I find that yum does not have all packages and rpm has yet to let me down. But most of the time either method will work.