• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (deprecated)
You are here: Home / Computing / Composer List All Versions of a Package

Composer List All Versions of a Package

Last updated on October 22, 2026 by Sal Ferrarello

When using Composer to manage your PHP dependencies, sometimes it’s helpful to fetch the versions available for a specific package. This is the command I use.

This command lists all of the versions available for psr/log

composer show "psr/log" --all --format=json | jq -r '.versions[]'

Grep results to only show those that include the string dev

composer show "psr/log" --all --format=json | jq -r '.versions[]' | grep 'dev'
Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP and JavaScript developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a principal engineer.

Filed Under: Computing, Dev Tips, Solution Tagged With: command line, composer, jq

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2026 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in