rpm -qa --last

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

rpm -qa --last

Postby kensan » Dec 7th, '19, 18:19

Hi all,
I have try
Code: Select all
rpm -qa --last
and get a list of packages but the last are dated April and not Dicember, where the last update is done today.

the first lines of the command:

Code: Select all
telepathy-gabble-0.18.4-4.mga7.x86_64         sab 13 apr 2019, 00:19:08
lib64SDL_gfx16-2.0.26-1.mga7.x86_64           sab 13 apr 2019, 00:19:08
lib64protobuf17-3.6.1-1.mga7.x86_64           sab 13 apr 2019, 00:19:08
lib64ofa0-0.9.3-22.mga7.x86_64                sab 13 apr 2019, 00:19:08
lib64chromaprint1-1.4.3-3.mga7.x86_64         sab 13 apr 2019, 00:19:08
x11-driver-video-nouveau-1.0.16-1.mga7.x86_64 sab 13 apr 2019, 00:18:59
symlinks-1.4-9.mga7.x86_64                    sab 13 apr 2019, 00:18:59
perl-Crypt-SSLeay-0.720.0-15.mga7.x86_64      sab 13 apr 2019, 00:18:59
mpgtx-1.3.1-14.mga7.x86_64                    sab 13 apr 2019, 00:18:59
migration-assistant-0.6.13-2.mga7.x86_64      sab 13 apr 2019, 00:18:59


this guide:
https://access.redhat.com/solutions/59698
show :
For complete package update history use following command.
#rpm -qa --last

the command works in root and in user mode ($ and #) but don't show the last packages installed. Is It a bug of my installation?
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: rpm -qa --last

Postby yankee495 » Dec 7th, '19, 19:31

Mine does the same thing. It says Sun 07 Jul 2019.

But, try this.

Code: Select all
cat /var/log/user.log|grep "install " >~/Documents/new-changes


It makes a list of installed packages in documents called new-changes.
If you want what's been uninstalled, change "install " to "erase ".
The space after install in the quotes is there to keep out lines with the words "installer" or "installed".
Again, keep the space in there so you don't get "eraser" or "erased".

You may still get a few lines of junk but it looks like this.
Code: Select all
Dec  1 14:11:50 i7-3770k [RPM][23624]: install lib64id3_3.8_3-1:3.8.3-28.mga7.x86_64: success
Dec  1 14:11:50 i7-3770k [RPM][23624]: install easytag-2.4.3-4.mga7.x86_64: success
Dec  1 14:11:51 i7-3770k [RPM][23624]: install lib64id3_3.8_3-1:3.8.3-28.mga7.x86_64: success
Dec  1 14:11:51 i7-3770k [RPM][23624]: install easytag-2.4.3-4.mga7.x86_64: success
Dec  3 15:49:53 i7-3770k [RPM][11447]: install lib64utf1.6-1.6.68-1.mga7.x86_64: success


Keep in mind, if you're working on a problem have a look at the actual log. Still, this is a good way to find out where to go in the log, by date. You can use "Block Selection Mode" in kwrite or kate to make a list of just the names.

With Block Select (Edit Menu> Block Selection mode) you can delete just this part.
It selects blocks of text vertically (up and down), not side to side.

Code: Select all
Dec  1 14:11:50 i7-3770k [RPM][23624]
Dec  1 14:11:50 i7-3770k [RPM][23624]
Dec  1 14:11:51 i7-3770k [RPM][23624]
Dec  1 14:11:51 i7-3770k [RPM][23624]
Dec  3 15:49:53 i7-3770k [RPM][11447]

Which leaves you with:

Code: Select all
: install lib64id3_3.8_3-1:3.8.3-28.mga7.x86_64: success
: install easytag-2.4.3-4.mga7.x86_64: success
: install lib64id3_3.8_3-1:3.8.3-28.mga7.x86_64: success
: install easytag-2.4.3-4.mga7.x86_64: success
: install lib64utf1.6-1.6.68-1.mga7.x86_64: success


Now you can use search and replace to search for ": install" and replace it with "urpmi --replacepkgs" to force it to reinstall packages. Also, search for ": success" and leave the replace box completely empty, no space or anything, and it'll just delete that part. After that you end up with a nice little list that you can make a script with.

Code: Select all
#!/bin/bash
# Fix Dec 7, 2019
urpmi --replacepkgs lib64id3_3.8_3-1:3.8.3-28.mga7.x86_64
urpmi --replacepkgs easytag-2.4.3-4.mga7.x86_64
urpmi --replacepkgs lib64id3_3.8_3-1:3.8.3-28.mga7.x86_64
urpmi --replacepkgs easytag-2.4.3-4.mga7.x86_64
urpmi --replacepkgs lib64utf1.6-1.6.68-1.mga7.x86_64


A corrupt mirror trashed my system one time and I manually switched mirrors then made a script to re-install the packages. Once it had good packages installed, everything was ok. You can do a lot with block select, including a lot of damage!

DO NOT do "urpme --auto package-name". It'll remove hundreds of dependencies and possibly all of your desktops. Learning just a few commands like "cat" and "grep" can help you quickly search logs for anything. There may be better ways, I've forgotten as much as I know. ;)

You only need to do the first command to get a good list, by date and time, including seconds.
There are 10 types of people, those who understand binary & those who don't.
Main Desktop
http://www.overclock.net/lists/display/view/id/3960066
yankee495
 
Posts: 433
Joined: May 25th, '12, 13:10
Location: Carthage, Mo. USA

Re: rpm -qa --last

Postby kensan » Dec 7th, '19, 23:56

Tanx Yankee, It is very useful the tip Edit Menu> Block Selection mode), very nice. I don't remove packages and their dependences, it is dangerous.

About cat /var/log/user.log I have not the log file user.log or my username.log
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: rpm -qa --last

Postby doktor5000 » Dec 8th, '19, 03:45

kensan wrote:I have try
Code: Select all
rpm -qa --last
and get a list of packages but the last are dated April and not Dicember, where the last update is done today.

Maybe it's just a misunderstanding, but the most recently installed packages are at the top, not at the bottom of the list.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: rpm -qa --last

Postby yankee495 » Dec 8th, '19, 06:39

Oh, I see Dok! I didn't know that. It scrolls off the top even though I have unlimited scrollback turned on. I'll look into it.

And Kensan,

I think I had to install rsyslog. It will be called "user.log" (it is not named with your user name). I don't remember if it ask me when I went to Mageia Control Center> System, then under Administration tools you'll see "View and search system logs". I think it ask to install Rsyslog when I went there. Just when I was learning more about the old logging system they changed to the systemd journal and journalctl. There's a been a lot of changes just during the Mageia years. I've used it since Mandrake, then Mandriva and now Mageia. Dok can tell you how to get the dual logging going. I actually prefer reading it in text files, but maybe I'll get used to the new way, someday.

Fact is, I seldom have serious issues, or any really. I need a good book on modern Linux with systemd.
Reading a book always helps. You won't remember it all but it's like a guide of what you can do and you'll know where to look it up.
I sure didn't know new files were at the top because I used the logs etc. I totally missed that!
There are 10 types of people, those who understand binary & those who don't.
Main Desktop
http://www.overclock.net/lists/display/view/id/3960066
yankee495
 
Posts: 433
Joined: May 25th, '12, 13:10
Location: Carthage, Mo. USA

Re: rpm -qa --last

Postby jkerr82508 » Dec 8th, '19, 09:38

Code: Select all
rpm -qa --last | less

will list the packages one page at a time. The most recently installed will be on the first page displayed.

Press
Code: Select all
q
to clear the display.

Jim
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: rpm -qa --last

Postby kensan » Dec 8th, '19, 11:30

Yesss. I forget the Konsole limited buffer and don't considered the very big size of the log file. Tank You.
Last edited by doktor5000 on Dec 8th, '19, 15:58, edited 1 time in total.
Reason: removed fullquote
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron