Esta versión de GitHub Enterprise se discontinuará el 2021-09-23. No se realizarán lanzamientos de patch, ni siquiera para problemas de seguridad críticos. Para obtener un mejor desempeño, más seguridad y nuevas características, actualiza a la última versión de GitHub Enterprise. Para obtener ayuda con la actualización, contacta al soporte de GitHub Enterprise.

Deleting a package

You can delete a version of a private package using GraphQL or on GitHub Enterprise.

Paquetes de GitHub is available with GitHub Free, GitHub Pro, GitHub Free for organizations, GitHub Team, GitHub Enterprise Cloud, Servidor de GitHub Enterprise 2.22, and GitHub One.

Note: Paquetes de GitHub is currently in beta for Servidor de GitHub Enterprise 2.22. To join the beta for your instance, use the sign-up form.

At this time, Paquetes de GitHub on tu instancia de servidor de GitHub Enterprise does not support deleting public packages.

You can only delete a specified version of a private package on GitHub Enterprise or with the GraphQL API. To remove an entire private package from appearing on GitHub Enterprise, you must delete every version of the package first.

Deleting a version of a private package on GitHub Enterprise

To delete a private package version, you must have admin permissions in the repository.

  1. En GitHub Enterprise, visita la página principal del repositorio.

  2. A la derecha de la lista de archivos, da clic en Paquetes.

    Enlace de paquetes en la página de resumen

  3. Click the name of the package that you want to delete. Package name

  4. On the right, use the Edit package drop-down and select "Manage versions". Package name

  5. To the right of the version you want to delete, click Delete. Delete package button

  6. To confirm deletion, type the package name and click I understand the consequences, delete this version. Confirm package deletion button

Deleting a version of a private package with GraphQL

Use the deletePackageVersion mutation in the GraphQL API. You must use a token with the read:packages, delete:packages, and repo scopes. For more information about tokens, see "About Paquetes de GitHub."

Here is an example cURL command to delete a package version with the package version ID of MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg, using a personal access token.

curl -X POST \
-H "Accept: application/vnd.github.package-deletes-preview+json" \
-H "Authorization: bearer TOKEN" \
-d '{"query":"mutation { deletePackageVersion(input:{packageVersionId:\"MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg==\"}) { success }}"}' \

To find all of the private packages you have published to Paquetes de GitHub, along with the version IDs for the packages, you can use the packages connection through the repository object. You will need a token with the read:packages and repo scopes. For more information, see the packages connection or the PackageOwner interface.

For more information about the deletePackageVersion mutation, see "deletePackageVersion."

You cannot delete an entire package, but if you delete every version of a package, the package will no longer show on GitHub Enterprise.

Did this doc help you?Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.