Diese Version von GitHub Enterprise wurde eingestellt am 2021-09-23. Es wird keine Patch-Freigabe vorgenommen, auch nicht für kritische Sicherheitsprobleme. Für eine bessere Leistung, verbesserte Sicherheit und neue Features nimm ein Upgrade auf die neueste Version von GitHub Enterprise vor. Wende Dich an den GitHub Enterprise-Support, um Hilfe beim Upgrade zu erhalten.

Ein Paket löschen

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

GitHub Packages is available with GitHub Free, GitHub Pro, GitHub Free for organizations, GitHub Team, GitHub Enterprise Cloud, GitHub Enterprise Server, and GitHub AE.

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

At this time, GitHub Packages on your GitHub Enterprise Server instance does not support deleting public packages.

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

Deleting a version of a private package on GitHub Enterprise Server

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

  1. Navigiere in GitHub Enterprise Server zur Hauptseite des Repository.

  2. To the right of the list of files, click Packages.

    Link „Packages" (Pakete) auf der Übersichtsseite

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

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

  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 GitHub Packages."

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 }}"}' \
HOSTNAME/graphql

To find all of the private packages you have published to GitHub Packages, 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. You will need a token with the read:packages and repo scopes.

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 Server.