Skip to main content
support both /opt/homebrew (Apple Silicon) and /usr/local (original)
Source Link
grg
  • 205.6k
  • 45
  • 364
  • 495

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"$(brew --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"$(brew --cellar)" -type d -maxdepth 0 | xargs ls -ltU # creation aka *installation date*
$ find /usr/local/Cellar"$(brew --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.

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.

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 "$(brew --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 "$(brew --cellar)" -type d -maxdepth 0 | xargs ls -ltU # creation aka *installation date*
$ find "$(brew --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.

Source Link

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.