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
For certain registries, you can use GraphQL to delete a version of a private package.
You cannot use the GitHub Packages GraphQL API with registries that support granular permissions. For the registries that only support repository-scoped permissions, and can be used with the GraphQL API, see "About permissions for GitHub Packages."
Required permissions to delete or restore a package
With registries that support granular permissions, you can choose to allow packages to be scoped to a user or an organization, or linked to a repository.
To delete a package that has granular permissions separate from a repository, such as container images stored at https://containers.HOSTNAME/NAMESPACE/PACKAGE-NAME (where NAMESPACE is the name of the personal account or organization to which the package is scoped), you must have admin access to the package. For more information, see "About permissions for GitHub Packages."
For packages that inherit their access permissions from repositories, you can delete a package if you have admin permissions to the repository.
Some registries only support repository-scoped packages. For a list of these registries, see "About permissions for GitHub Packages."
Deleting a package version
Deleting a version of a repository-scoped package on GitHub
To delete a version of a repository-scoped package, you must have admin permissions to the repository in which the package is published. For more information, see "Required permissions."
-
On your GitHub Enterprise Server instance, navigate to the main page of the repository.
-
In the right sidebar of your repository, click Packages.

-
Search for and then click the name of the package that you want to manage.
-
Navigate to where you can manage versions for your type of package.
- If your package is a container, under the "Recent Versions" section, click View and manage all versions.

- For types of packages other than containers:
- On the right-hand side, click Package settings.

- On the left click Manage versions.

- On the right-hand side, click Package settings.
- If your package is a container, under the "Recent Versions" section, click View and manage all versions.
-
In the list of packages, find the version of the package that you want to delete.
- If your package is a container, to the right of the package version click , then select Delete version from the dropdown menu.

- If your package is a container, to the right of the package version click , then select Delete version from the dropdown menu.