On Wed, 27 Jan 2021, Yasuhiro Kimura wrote:

From: Freddie Cash <fjwc...@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.

Try something like this as a starting point for a shell script:

sqlite3 /var/db/pkg/local.sqlite \
 "select datetime(time,'unixepoch'),origin,version from packages \
 where datetime(time,'unixepoch')>=date('now','-7 day') \
 order by time desc"
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to