List of packages upgraded last time `pkg upgrade` was executed

Peter Pentchev roam at ringlet.net
Wed Jan 27 08:35:55 UTC 2021


On Wed, Jan 27, 2021 at 10:57:22AM +0900, Yasuhiro Kimura wrote:
> From: Freddie Cash <fjwcash at gmail.com>
> Subject: Re: List of packages upgraded last time `pkg upgrade` was executed
> Date: Tue, 26 Jan 2021 17:26:29 -0800
> 
> > /var/log/messages and I think /var/log/daemon include the output of the pkg
> > commands. If you have the log files backed up from the last time it was
> > run, you could grep for pkg in those.
> > 
> > No idea if this info is also stored in the sqlite databases pkg uses.
> 
> Thank you for reply. But my intention is to write shell script that
> gets the list of upgraded packages and does something by using
> it. Because of that the list need to be gotton without any user
> interaction. So unfortunately your method is not applicable to my
> case.

Well, there is the option of running a pkg query before and after
the upgrade and comparing the results... especially if you write it in
a higher-level language than the shell, it Should Not Be Too Hard(tm) to
figure out which packages have changed their version, what new ones have
appeared, which ones have been removed...

But, yeah, it is certainly easy for me to suggest that somebody else
write something "simple" :)

G'luck,
Peter

-- 
Peter Pentchev  roam at ringlet.net roam at debian.org pp at storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20210127/70ed0bbd/attachment.sig>


More information about the freebsd-ports mailing list