Package deletion and restoration support on GitHub
On GitHub if you have the required access, you can delete:
- An entire private package
- An entire public package, if there's not more than 5000 downloads of any version of the package
- A specific version of a private package
- A specific version of a public package, if the package version doesn't have more than 5,000 downloads
Note
- You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact us through the GitHub Support portal for further assistance.
- When deleting public packages, be aware that you may break projects that depend on your package.
On GitHub, you can also restore an entire package or package version, if:
- You restore the package within 30 days of its deletion.
- The same package namespace is still available and not used for a new package.
Packages API support
Note
GitHub Packages only supports authentication using a personal access token (classic). For more information, see Managing your personal access tokens.
You can use the REST API to manage your packages. For more information, see the REST API endpoints for packages.
Note
The ability for GitHub Actions workflows to delete and restore packages using the REST API is currently in public preview and subject to change.
With registries that support granular permissions, you can use a GITHUB_TOKEN in a GitHub Actions workflow to delete or restore packages using the REST API. The token must have