Skip to content
Software capabilities
GitHub Packages

List packages published by a GitHub organization

Review package names, types, and visibility in GitHub Packages while keeping package registry inventory separate from GitHub repository operations.

Documentation reviewed · 2 methods with sources

Ways to do it

  1. API: GET /orgs/{org}/packages
  2. CLI: gh api
API

GET /orgs/{org}/packages

List packages for an organization, optionally filtering by package_type and visibility.

Read source: GET /orgs/{org}/packages reference
Requirements
Package-metadata access to the organization and, for classic personal access tokens or OAuth app tokens, the read:packages scope.
Limitations
Results are paginated with per_page and page. Private package metadata requires access, and package_type narrows the result to one registry type.

Example shell

curl --fail -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/orgs/$GITHUB_ORG/packages?package_type=container&per_page=100"
CLI

gh api

Use the official GitHub CLI as a thin read-only client for the same Packages REST endpoint.

Read source: gh api reference
Requirements
GitHub CLI authenticated with gh auth login or GH_TOKEN, organization visibility, and package read access.
Limitations
With --paginate, gh follows all available pages. per_page sets the page size. Remove --paginate for a single page.

Example shell

gh api --paginate "/orgs/$GITHUB_ORG/packages?package_type=container&per_page=100" --jq ".[] | {name,package_type,visibility}"