Vic Johnson

menu

Brew list with installation time

The command:

brew list --installed-on-request | xargs brew info --json=v1 | jq -r '.[] | "\(.name)\t\(.installed[].time | strftime("%Y-%m-%d"))"' | sort -k 2 | column -t

The breakdown

PartWhat it does
brew list --installed-on-requestLists all packages that you explicitly installed
xargs brew info --json=v1Get the info for each installed package in JSON format
jq -r '.[] | "\(.name)\t\(.installed[].time | strftime("%Y-%m-%d"))"'Pull the package name and installed timestamp from the JSON. Format the date
sort -k 2Sort by installed date
column -tBuild a table