You are not logged in.

#1 2017-01-20 16:11:46

garchws
Member
Registered: 2015-10-31
Posts: 18

Displaying Which Packages Got Updated Last with pacman -Syu?

A recent system update recently destroyed a project I was working on (I'm assuming some dependency got swapped and I cannot track it down). In order to update the system, I either used:

yaourt -Syu
pacman -Syu

(I cannot remember which).

Question: Is there some log on my system which displays which packages got updated last using those commands?

Offline

#2 2017-01-20 16:14:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

/var/log/pacman.log

Offline

#3 2017-01-20 16:31:15

garchws
Member
Registered: 2015-10-31
Posts: 18

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

@Scimmia: That is perfect.

Do you know if there is a way to systematically reverse a system upgrade, perhaps by using the contents of /var/log/pacman.log?

Offline

#4 2017-01-20 16:31:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

For a quick list of what was upgraded by the last full system upgrade:

tac /var/log/pacman.log | sed -n '/full system upgrade/q;s/.*\[ALPM\] upgraded //p'

To downgrade, see the wiki.  Always search the wiki before asking, answers to most questions can be found there.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-01-21 01:56:38

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 393

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

Trilby wrote:

For a quick list of what was upgraded by the last full system upgrade:

tac /var/log/pacman.log | sed -n '/full system upgrade/q;s/.*\[ALPM\] upgraded //p'

To downgrade, see the wiki.  Always search the wiki before asking, answers to most questions can be found there.

And people wonder why we love Arch? It's the Moderators! big_smile

Regards,
And apologies for adding superfluous fluff...


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#6 2017-01-21 19:09:14

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

Trilby wrote:

For a quick list of what was upgraded by the last full system upgrade:

tac /var/log/pacman.log | sed -n '/full system upgrade/q;s/.*\[ALPM\] upgraded //p'

To downgrade, see the wiki.  Always search the wiki before asking, answers to most questions can be found there.

This is really useful. I'm going to alias this to something. Maybe this should be put in the wiki somewhere?


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#7 2017-01-21 20:02:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

Feel free to add it.  But note that it is far from foolproof.  If you run updates frequently enough (as I do) that there is often nothing to update, this line will return nothing.  It is literally what was updated in the last attempted system upgrade, not what was updated the last time there was something to update.

Also to be more readable, it might be good to switch the order of the two sed commands.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-01-21 20:36:25

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Displaying Which Packages Got Updated Last with pacman -Syu?

Trilby wrote:

Feel free to add it.  But note that it is far from foolproof.  If you run updates frequently enough (as I do) that there is often nothing to update, this line will return nothing.  It is literally what was updated in the last attempted system upgrade, not what was updated the last time there was something to update.

Also to be more readable, it might be good to switch the order of the two sed commands.

This is a good point. I've always just looked manually at the log when I really needed to know. Thankfully updates don't cause problems too frequently. Maybe I'll add this to my list of rainy day projects though, to write something more reliable. It would be nice to have a reliable pacman log parser.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

Board footer

Powered by FluxBB