Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-25-2014, 03:03 AM
|
#1
|
Member
Registered: Aug 2009
Posts: 539
Rep:
|
[yum] How to check when is an RPM installed/updated last time?
Hi,
I use the RedHat Linux. I use quite often the command 'yum' to install, update or upgrade the RPM packages. Sometimes I want to know when is a pachage installed or updated last time.
|
|
|
03-25-2014, 03:06 AM
|
#2
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep:
|
yum.log will record all of your update activities
OR
yum history
|
|
2 members found this post helpful.
|
03-25-2014, 03:08 AM
|
#3
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
see /var/log/yum.log*
Evo2.
|
|
1 members found this post helpful.
|
03-25-2014, 03:18 AM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
YUM history and logs :
http://docs.fedoraproject.org/en-US/...e/ch05s16.html
The "rpm last" command may also be useful :
$ rpm -qa --last | grep <name> (or part of package name)
Saving an install list with date/time, the latest install in line 1:
$ rpm -qa --last > last-packages.txt
-
|
|
1 members found this post helpful.
|
03-25-2014, 03:37 AM
|
#5
|
Member
Registered: Aug 2009
Posts: 539
Original Poster
Rep:
|
Quote:
Originally Posted by kirukan
yum.log will record all of your update activities
OR
yum history
|
Yes, I know the file /var/log/yum.log. But it seems it just contains the information from begin this year. I think this could be configured to contain longer log information. Right?
|
|
|
03-25-2014, 03:45 AM
|
#6
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
Quote:
Originally Posted by thomas2004ch
Yes, I know the file /var/log/yum.log. But it seems it just contains the information from begin this year.
|
Did you check for rotated log files? Ie /var/log/yum.log* (as suggested earlier).
Evo2.
|
|
|
03-25-2014, 04:02 AM
|
#7
|
Member
Registered: Aug 2009
Posts: 539
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
YUM history and logs :
http://docs.fedoraproject.org/en-US/...e/ch05s16.html
The "rpm last" command may also be useful :
$ rpm -qa --last | grep <name> (or part of package name)
Saving an install list with date/time, the latest install in line 1:
$ rpm -qa --last > last-packages.txt
-
|
I think this command does nothing else than read in the file /var/log/yum.log, right?
|
|
|
03-25-2014, 04:06 AM
|
#8
|
Member
Registered: Aug 2009
Posts: 539
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
Hi,
Did you check for rotated log files? Ie /var/log/yum.log* (as suggested earlier).
Evo2.
|
Here is rotation for yum.log:
Code:
/var/log/yum.log {
missingok
notifempty
size 30k
yearly
create 0600 root root
}
I think I have to increase the size from 30K to a larger size, right?
But if I even want to see the record from last January, should I take out the yearly and set 600 days for example?
I list the file size of /var/log.yum.log and it tells as follow:
Code:
# ll -h /var/log/yum.log
-rw------- 1 root root 48K Mar 21 11:24 /var/log/yum.log
One can see the size is not 30K but 48K. Why?
Last edited by thomas2004ch; 03-25-2014 at 04:11 AM.
|
|
|
03-25-2014, 04:15 AM
|
#9
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep:
|
Because the logrotate is yearly
|
|
|
03-25-2014, 04:27 AM
|
#10
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397
|
I think you'll find rpm reads the rpm db (/var/lib/rpm/ on Centos 6)
|
|
1 members found this post helpful.
|
03-25-2014, 04:53 AM
|
#11
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 7 .
Quote:
I think this command does nothing else than read in the file /var/log/yum.log
|
See post #10, @chrism01.
$ rpm -qa <-etc. option> : Uses the "rpm data base" (/var/lib/rpm/),
which means that also packages installed without using yum are listed.
I.e. packages installed with # rpm -Uvh <package.rpm>
-
|
|
1 members found this post helpful.
|
03-25-2014, 09:01 AM
|
#12
|
Member
Registered: Aug 2009
Posts: 539
Original Poster
Rep:
|
Can someone answer my question in post #8 at the end?
|
|
|
03-25-2014, 09:57 AM
|
#13
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
|
|
|
03-25-2014, 10:32 AM
|
#14
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
Quote:
Originally Posted by thomas2004ch
Here is rotation for yum.log:
Code:
/var/log/yum.log {
missingok
notifempty
size 30k
yearly
create 0600 root root
}
I list the file size of /var/log.yum.log and it tells as follow:
Code:
# ll -h /var/log/yum.log
-rw------- 1 root root 48K Mar 21 11:24 /var/log/yum.log
One can see the size is not 30K but 48K. Why?
|
You can't have two conditions. The last one, in this case "yearly", overrides. If you run logrotate with the "-d" flag you will see that it is using only the "yearly" test.
|
|
|
03-25-2014, 10:40 AM
|
#15
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
The most straightforward way to find the install/update date for a package is to run "rpm -qi {packagename}" and note the line that begins "Install Date:".
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 12:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|