Delete and restore a package
You can delete it on GitHub if you have the required access:
- An entire private package.
- If there aren't more than 5000 downloads of any version of the package, an entire public package.
- A specific version of a private package.
- A specific version of a public package if the package version doesn't have more than 5000 downloads.
For packages that inherit their access permissions from repositories, you can delete a package if you have admin permissions to the repository.
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.
You can use the REST API to manage your packages. For more information, see the "GitHub Packages API".
Deleting a package version
You can delete a package version:
- Deleting a version of a repository-scoped package on GitHub.
- Deleting a version of a repository-scoped package with GraphQL.
- Deleting a version of a user-scoped package on GitHub.
- Deleting a version of an organization-scoped package on GitHub.
To delete a version of a repository-scoped package, you must have admin permissions to the repository that owns the package.
- On GitHub.com, navigate to the main page of the repository.
- To the right of the list of files, click Packages.
- Search for and select your package.
- In the top right of your package's landing page, click Package settings.
- On the left, click Manage versions.
- To the right of the version you want to delete, click and select Delete version.
- To confirm the deletion, type the package name and click I understand the consequences, delete this version.
Deleting an entire package
You can delete a package version:
- Deleting an entire repository-scoped package on GitHub.
- Deleting an entire user-scoped package on GitHub.
- Deleting an entire organization-scoped package on GitHub.
To delete an entire repository-scoped package, you must have admin permissions to the repository that owns the package.
- On GitHub.com, navigate to the main page of the repository.
- To the right of the list of files, click Packages.
- Search for and select your package.
- In the top right of your package's landing page, click Package settings.
- Under "Danger Zone," click Delete this package.
- Review the confirmation message, enter your package name, click I understand, and delete this package.
Restoring a package version
You can restore a package version from your package's landing page.
- Navigate to your package's landing page.
- On the right, click Package settings.
- On the left, click Manage versions.
- Use the "Versions" drop-down menu and select Deleted on the top right.
- Next to the deleted package version you want to restore, click Restore.
- To confirm, click I understand the consequences, restore this version.
For more information, see: