4

Homebrew shows me all packages that I have installed with brew leaves. However, it doesn't show me when was a package been installed.

Is it possible to make Homebrew show the installation date of packages?

4

brew ls -la this command may help you a bit. This command shows you information like command ls -la. You may know more from here https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/ls.1.html

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 2
    this was somewhat useful for me (so I voted up). An issue is there is no actual -a option although -l works and will show a modified date. brew ls also appears to be the same as brew list, correct me if I'm wrong. – Chan-Ho Suh Jun 19 '18 at 1:27
  • brew ls -l worked for me, but brew ls -la did not. – Mike Barlow - BarDev Jan 6 at 20:51
3

brew ls -lt lists installed packages, sorted by last modified date of the package installation directory, newest to oldest.

Equivalent results can be obtained with:

find /usr/local/Cellar -type d -maxdepth 0 | xargs ls -lt

With this incantation, sort order can be changed by adding -U (creation date) or -u (last access date) to the ls -lt

$ find /usr/local/Cellar -type d -maxdepth 0 | xargs ls -ltU # creation aka *installation date*
$ find /usr/local/Cellar -type d -maxdepth 0 | xargs ls -ltu # last access aka last use date

Add -r to ls -lt to reverse order, oldest to newest.

brew ls -l lists installed packages in alphabetical order.

It's unknown to me whether Homebrew affects a package folder's creation date during brew upgrade, so be aware that learning the first installation date of a package may be elusive.

The -a option for brew ls -l appears to be no longer available.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .