1

How can I get a list of packages, that were last installed or upgraded by pacman/ pacaur in Arch Linux including the timestamp? I have one more condition as well, I want to skip dependences. I only want the list of names, written in pacaur -S [package].

NOTE: this question is close to this other question, titled: List that contains the last installed / upgraded packages in Arch Linux.

slm
  • 363,520
  • 117
  • 767
  • 871
  • What do you have so far? Some script? You could use the answer you linked and parse the output of that command. You can filter package names with `pacman -Qe some-package`. – Lucas Jul 22 '18 at 13:17
  • 2
    You would use `expac` for this. – jasonwryan Jul 22 '18 at 18:39
  • `expac` has a formatting option that looks like what you want - https://github.com/falconindy/expac. – slm Jul 23 '18 at 04:22
  • Btw, `pacaur` is no longer maintained. You should switch to something else. – muru Jul 23 '18 at 04:45

1 Answers1

3

There is no way to discover which packages were installed with pacman -S pkgname (or AUR helpers like pacaur), because packages which are reinstalled or updated will preserve their installation reason, and AUR helpers are responsible for specifying --asdeps during initial install.

However, you can use pacman -Qqe to get a list of explicitly installed packages, and pass that list via stdout to the expac command to print the dates they were last installed/updated. For example:

pacman -Qqe | expac -Q '%-30n\t%l' -

See the expac man page for more details on formatting options, particularly --timefmt

eschwartz
  • 351
  • 1
  • 9