You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,11 +37,11 @@ The repository owner has full control of the repository. In addition to the acti
37
37
| Limit interactions with the repository | "[Limiting interactions in your repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)" |{% endif %}{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
38
38
| Rename a branch, including the default branch | "[Renaming a branch](/github/administering-a-repository/renaming-a-branch)" |{% endif %}
39
39
| Merge a pull request on a protected branch, even if there are no approving reviews | "[About protected branches](/github/administering-a-repository/about-protected-branches)" |
40
-
| Delete the repository | "[Deleting a repository](/github/administering-a-repository/deleting-a-repository)" |
40
+
| Delete the repository | "[Deleting a repository](/repositories/creating-and-managing-repositories/deleting-a-repository)" |
41
41
| Manage the repository's topics | "[Classifying your repository with topics](/github/administering-a-repository/classifying-your-repository-with-topics)" |{% ifversion fpt or ghec %}
42
42
| Manage security and analysis settings for the repository | "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)" |{% endif %}{% ifversion fpt or ghec %}
43
-
| Enable the dependency graph for a private repository | "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)" |{% endif %}{% ifversion fpt or ghes > 3.0 or ghec %}
44
-
| Delete and restore packages | "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" |{% endif %}{% ifversion ghes = 3.0 or ghae %}
43
+
| Enable the dependency graph for a private repository | "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)" |{% endif %}{% ifversion fpt or ghes > 3.1 or ghec or ghae %}
44
+
| Delete and restore packages | "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" |{% endif %}{% ifversion ghes < 3.1 %}
| Customize the repository's social media preview | "[Customizing your repository's social media preview](/github/administering-a-repository/customizing-your-repositorys-social-media-preview)" |
47
47
| Create a template from the repository | "[Creating a template repository](/github/creating-cloning-and-archiving-repositories/creating-a-template-repository)" |{% ifversion fpt or ghes or ghae-issue-4864 or ghec %}
Copy file name to clipboardExpand all lines: content/developers/apps/building-oauth-apps/scopes-for-oauth-apps.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Name | Description
70
70
 `read:discussion` | Allows read access for team discussions.{% ifversion fpt or ghae or ghec %}
71
71
**`write:packages`** | Grants access to upload or publish a package in {% data variables.product.prodname_registry %}. For more information, see "[Publishing a package](/github/managing-packages-with-github-packages/publishing-a-package)".
72
72
**`read:packages`** | Grants access to download or install packages from {% data variables.product.prodname_registry %}. For more information, see "[Installing a package](/github/managing-packages-with-github-packages/installing-a-package)".
73
-
**`delete:packages`** | Grants access to delete packages from {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."{% endif %}
73
+
**`delete:packages`** | Grants access to delete packages from {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."{% endif %}
74
74
**`admin:gpg_key`** | Fully manage GPG keys.
75
75
 `write:gpg_key`| Create, list, and view details for GPG keys.
76
76
 `read:gpg_key`| List and view details for GPG keys.{% ifversion fpt or ghec %}
Copy file name to clipboardExpand all lines: content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ Some of the features listed below are limited to organizations using {% data var
103
103
| Edit a repository's description | | | | **X** | **X** |{% ifversion fpt or ghae or ghec %}
104
104
|[View and install packages](/packages/publishing-and-managing-packages)|**X**|**X**|**X**|**X**|**X**|
Copy file name to clipboardExpand all lines: content/packages/learn-github-packages/about-permissions-for-github-packages.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ To use or manage a package hosted by a package registry, you must use a token wi
47
47
48
48
For example:
49
49
- To download and install packages from a repository, your token must have the `read:packages` scope, and your user account must have read permission.
50
-
- {% ifversion fpt or ghes > 3.0 or ghec %}To delete a package on {% data variables.product.product_name %}, your token must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages.{% elsif ghes < 3.1 %}To delete a specified version of a private package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope. Public packages cannot be deleted.{% elsif ghae %}To delete a specified version of a package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope.{% endif %} For more information, see "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."
50
+
- {% ifversion fpt or ghes > 3.0 or ghec %}To delete a package on {% data variables.product.product_name %}, your token must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages.{% elsif ghes < 3.1 %}To delete a specified version of a private package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope. Public packages cannot be deleted.{% elsif ghae %}To delete a specified version of a package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope.{% endif %} For more information, see "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."
Copy file name to clipboardExpand all lines: content/packages/learn-github-packages/deleting-a-package.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ intro: 'You can delete a version of a {% ifversion not ghae %}private{% endif %}
4
4
product: '{% data reusables.gated-features.packages %}'
5
5
versions:
6
6
ghes: '>=2.22 <3.1'
7
-
ghae: '*'
8
7
---
9
8
10
9
{% data reusables.package_registry.packages-ghes-release-stage %}
@@ -31,7 +30,7 @@ To delete a {% ifversion not ghae %}private {% endif %}package version, you must
31
30
32
31
## Deleting a version of a {% ifversion not ghae %}private {% endif %}package with GraphQL
33
32
34
-
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 {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)."
33
+
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 {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)."
35
34
36
35
Here is an example cURL command to delete a package version with the package version ID of `MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg`, using a personal access token.
Copy file name to clipboardExpand all lines: content/packages/learn-github-packages/deleting-and-restoring-a-package.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ versions:
11
11
fpt: '*'
12
12
ghes: '>=3.1'
13
13
ghec: '*'
14
+
ghae: '*'
14
15
shortTitle: Delete & restore a package
15
16
---
16
17
@@ -36,6 +37,7 @@ On {% data variables.product.prodname_dotcom %}, you can also restore an entire
36
37
- You restore the package within 30 days of its deletion.
37
38
- The same package namespace is still available and not used for a new package.
38
39
40
+
{% ifversion fpt or ghec or ghes %}
39
41
## Packages API support
40
42
41
43
{% ifversion fpt or ghec %}
@@ -44,7 +46,7 @@ You can use the REST API to manage your packages. For more information, see the
44
46
45
47
{% endif %}
46
48
47
-
For packages that inherit their permissions and access from repositories, you can use GraphQL to delete a specific package version.{% ifversion fpt or ghec %} The {% data variables.product.prodname_registry %} GraphQL API does not support containers or Docker images that use the package namespace `https://ghcr.io/OWNER/PACKAGE-NAME`. For more information about GraphQL support, see "[Deleting a version of a repository-scoped package with GraphQL](#deleting-a-version-of-a-repository-scoped-package-with-graphql)."
49
+
For packages that inherit their permissions and access from repositories, you can use GraphQL to delete a specific package version.{% ifversion fpt or ghec %} The {% data variables.product.prodname_registry %} GraphQL API does not support containers or Docker images that use the package namespace `https://ghcr.io/OWNER/PACKAGE-NAME`.{% endif %} For more information about GraphQL support, see "[Deleting a version of a repository-scoped package with GraphQL](#deleting-a-version-of-a-repository-scoped-package-with-graphql)."
48
50
49
51
{% endif %}
50
52
@@ -63,7 +65,7 @@ Repository-scoped packages on {% data variables.product.prodname_registry %} inc
63
65
{% ifversion fpt or ghec %}
64
66
65
67
To delete a package that has granular permissions separate from a repository, such as container images stored at `https://ghcr.io/OWNER/PACKAGE-NAME`, you must have admin access to the package.
66
-
<!--PLACEHOLDER - once packages restructuring is done this is a good place to link to the access control and visibility article.-->
68
+
For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)."
67
69
68
70
{% endif %}
69
71
@@ -82,14 +84,14 @@ To delete a version of a repository-scoped package, you must have admin permissi
82
84
6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**.
### Deleting a version of a repository-scoped package with GraphQL
86
89
87
90
For packages that inherit their permissions and access from repositories, you can use the GraphQL to delete a specific package version.
88
91
89
92
{% ifversion fpt or ghec %}
90
-
GraphQL is not supported for containers or Docker images at `ghcr.io`.
93
+
For containers or Docker images at `ghcr.io`, GraphQL is not supported but you can use the REST API. For more information, see the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)."
91
94
{% endif %}
92
-
<!--PLACEHOLDER for when API link is live: For full support, use the REST API. For more information, see the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)." -->
93
95
94
96
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 {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)."
95
97
@@ -109,6 +111,8 @@ For more information about the `deletePackageVersion` mutation, see "[`deletePac
109
111
110
112
You cannot directly delete an entire package using GraphQL, but if you delete every version of a package, the package will no longer show on {% data variables.product.product_name %}.
111
113
114
+
{% endif %}
115
+
112
116
{% ifversion fpt or ghec %}
113
117
### Deleting a version of a user-scoped package on {% data variables.product.prodname_dotcom %}
114
118
@@ -124,12 +128,12 @@ To review who can delete a package version, see "[Required permissions](#require
124
128
6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**.
### Deleting a version of an organization-scoped package on GitHub
131
+
### Deleting a version of an organization-scoped package on {% data variables.product.prodname_dotcom %}
128
132
129
133
To delete a specific version of an organization-scoped package on {% data variables.product.prodname_dotcom %}, such as for a Docker image at `ghcr.io`, use these steps.
130
134
To delete an entire package, see "[Deleting an entire organization-scoped package on {% data variables.product.prodname_dotcom %}](#deleting-an-entire-organization-scoped-package-on-github)."
131
135
132
-
To review who can delete a package version, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)."
136
+
To review who can delete a package version, see "[Required permissions to delete or restore a package](#required-permissions-to-delete-or-restore-a-package)."
133
137
134
138
{% data reusables.package_registry.package-settings-from-org-level %}
135
139
{% data reusables.package_registry.package-settings-option %}
@@ -189,18 +193,24 @@ You can restore a deleted package or version if:
189
193
190
194
For example, if you have a deleted rubygem package named `octo-package` that was scoped to the repo `octo-repo-owner/octo-repo`, then you can only restore the package if the package namespace `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` is still available, and 30 days have not yet passed.
191
195
192
-
You must also meet one of these permission requirements:
196
+
{% ifversion fpt or ghec %}
197
+
To restore a deleted package, you must also meet one of these permission requirements:
193
198
- For repository-scoped packages: You have admin permissions to the repository that owns the deleted package.{% ifversion fpt or ghec %}
194
199
- For user-account scoped packages: Your user account owns the deleted package.
195
200
- For organization-scoped packages: You have admin permissions to the deleted package in the organization that owns the package.{% endif %}
201
+
{% endif %}
202
+
203
+
{% ifversion ghae or ghes %}
204
+
To delete a package, you must also have admin permissions to the repository that owns the deleted package.
205
+
{% endif %}
196
206
197
207
For more information, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)."
198
208
199
209
Once the package is restored, the package will use the same namespace it did before. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
200
210
201
211
### Restoring a package in an organization
202
212
203
-
You can restore a deleted package through your organization account settings, as long as the package was in one of your repositories{% ifversion fpt or ghec %} or had granular permissions and was scoped to your organization account{% endif %}.
213
+
You can restore a deleted package through your organization account settings, as long as the package was in a repository owned by the organizaton{% ifversion fpt or ghec %} or had granular permissions and was scoped to your organization account{% endif %}.
204
214
205
215
To review who can restore a package in an organization, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)."
Copy file name to clipboardExpand all lines: content/packages/learn-github-packages/introduction-to-github-packages.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ You can delete a version of a private package in the {% data variables.product.p
112
112
You can delete a version of a package in the {% data variables.product.product_name %} user interface or using the GraphQL API.
113
113
{% endif %}
114
114
115
-
When you use the GraphQL API to query and delete private packages, you must use the same token you use to authenticate to {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}" and "[Forming calls with GraphQL]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/forming-calls-with-graphql)."
115
+
When you use the GraphQL API to query and delete private packages, you must use the same token you use to authenticate to {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}" and "[Forming calls with GraphQL]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/forming-calls-with-graphql)."
116
116
117
117
You can configure webhooks to subscribe to package-related events, such as when a package is published or updated. For more information, see the "[`package` webhook event](/webhooks/event-payloads/#package)."
Copy file name to clipboardExpand all lines: content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,4 +191,4 @@ To install an Apache Maven package from {% data variables.product.prodname_regis
191
191
## Further reading
192
192
193
193
- "[Working with the Gradle registry](/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)"
194
-
- "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
194
+
- "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
- "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
266
+
- "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
0 commit comments