List that contains the last installed / upgraded packages in Arch Linux
32,792
Solution 1
To get a list of last installed packages, you can run:
grep -i installed /var/log/pacman.log
Example output of last installed packages:
[2015-08-24 15:32] [ALPM] warning: /etc/pamac.conf installed as /etc/pamac.conf.pacnew
[2015-08-24 15:32] [ALPM] installed python-packaging (15.3-1)
[2015-08-24 15:32] [ALPM] installed python2-packaging (15.3-1)
[2015-08-25 10:37] [ALPM] installed ttf-ubuntu-font-family (0.80-5)
[2015-08-25 10:43] [ALPM] installed ttf-google-fonts (20150805.r201-1)
[2015-08-25 10:44] [ALPM] installed ttf-ubuntu-font-family (0.80-5)
[2015-08-26 17:39] [ALPM] installed mozilla-extension-gnome-keyring-git (0.10.r36.378d9f3-1)
To get a list of last upgraded packages, you can run:
grep -i upgraded /var/log/pacman.log
Example output of last upgraded packages:
[2015-08-27 10:00] [ALPM] upgraded libinput (0.99.1-1 -> 1.0.0-1)
[2015-08-27 10:00] [ALPM] upgraded python2-mako (1.0.1-1 -> 1.0.2-1)
[2015-08-27 16:03] [ALPM] upgraded tdb (1.3.6-1 -> 1.3.7-1)
[2015-08-27 16:03] [ALPM] upgraded ldb (1.1.20-1 -> 1.1.21-1)
[2015-08-27 16:03] [ALPM] upgraded python2-mako (1.0.2-1 -> 1.0.2-2)
To get a list of last installed or upgraded packages, you can run:
grep -iE 'installed|upgraded' /var/log/pacman.log
Example output of last upgraded packages:
[2015-08-25 09:56] [ALPM] upgraded jdk (8u51-2 -> 8u60-1)
[2015-08-25 10:37] [ALPM] installed ttf-ubuntu-font-family (0.80-5)
[2015-08-25 10:43] [ALPM] installed ttf-google-fonts (20150805.r201-1)
[2015-08-25 10:44] [ALPM] installed ttf-ubuntu-font-family (0.80-5)
[2015-08-26 17:39] [ALPM] installed mozilla-extension-gnome-keyring-git (0.10.r36.378d9f3-1)
[2015-08-27 10:00] [ALPM] upgraded curl (7.43.0-1 -> 7.44.0-1)
[2015-08-27 10:00] [ALPM] upgraded gc (7.4.2-2 -> 7.4.2-3)
[2015-08-27 10:00] [ALPM] upgraded kmod (21-1 -> 21-2)
[2015-08-27 10:00] [ALPM] upgraded libinput (0.99.1-1 -> 1.0.0-1)
[2015-08-27 10:00] [ALPM] upgraded python2-mako (1.0.1-1 -> 1.0.2-1)
[2015-08-27 16:03] [ALPM] upgraded tdb (1.3.6-1 -> 1.3.7-1)
[2015-08-27 16:03] [ALPM] upgraded ldb (1.1.20-1 -> 1.1.21-1)
[2015-08-27 16:03] [ALPM] upgraded python2-mako (1.0.2-1 -> 1.0.2-2)
Solution 2
Even though it would be nice to list only the packages that were upgraded during the last update invocation, it wouldn't fit into a nice one-liner.
So to extend the answer from @BuZZ-dEE, here is my approach that lists all upgraded packages from the day of last update:
grep -iE "$(tail -n1 /var/log/pacman.log | grep -iEo "([0-9]{4}-[0-9]{2}-[0-9]{2})").+upgraded" /var/log/pacman.log
Related videos on Youtube
![GleasonK](https://i.stack.imgur.com/VKOg3.png?s=256&g=1)
Author by
GleasonK
Updated on September 18, 2022Comments
-
GleasonK almost 2 years
How can I get a list of packages, that last installed / upgraded by
pacman
/yaourt
in Arch Linux including the timestamp? -
don_crissti almost 9 yearsYou'll have to define the meaning of "last" as this definitely doesn't list only "the last installed/upgraded packages". It lists pretty much everything... so either fix the question or the answer (or both).
-
GleasonK almost 9 yearsYes correct, but it does want I want. I can see the last installed / upgraded packages.
-
Jakob Bennemann almost 9 yearsMight I recommend using
tail
at the end of the pipeline to get the last (10
by-default) n messages? -
young_souvlaki about 3 years
alias upgraded='grep -i upgraded /var/log/pacman.log | tac | less'