title | intro | versions | type | topics | shortTitle | permissions | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Deleting users from your instance |
You can delete a user's account to permanently remove their data from {% data variables.location.product_location %}. |
|
how_to |
|
Delete a user |
Site administrators |
Deleting a user account removes all repositories, forks of private repositories, wikis, issues, pull requests, pages, and packages and container images owned by the user account. By deleting a user account, you may break software projects and workflows that depend on these things.
Issues and pull requests the user has created and comments they've made in repositories owned by other users or organizations will not be deleted and will instead be associated with a ghost
user account.
Once a user account has been deleted, the username will be available for use with a different account on {% data variables.location.product_location %}.
You cannot delete a user that is currently an organization owner.
- If the user is the only owner: Transfer ownership to another person, or delete the organization. See "AUTOTITLE" and "AUTOTITLE."
- If there are other owners: Remove the user from the organization. See "AUTOTITLE."
You cannot delete your own user account. If you need to delete your own user account, ask another site administrator to delete your account for you.
If you have enabled SCIM provisioning on your instance, you cannot delete users who have been provisioned by SCIM.
{% data variables.product.prodname_dotcom %} recommends suspending users where possible, rather than deleting their accounts. Suspending user accounts on {% data variables.product.product_name %} preserves the history of resources owned by the user account, such as repositories and pull requests, and releases the licensed seat previously consumed by the user. See "AUTOTITLE."
As an alternative to deleting or suspending a user account, to stop a user's repositories being permanently removed from your enterprise you can place a legal hold on the user account. See "Placing a legal hold on a user or organization."
Before deleting a user account, you should consider if a backup or copy of the repositories, private forks, wikis, issues, and pull requests owned by the user account is required. See "AUTOTITLE" and "AUTOTITLE."
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.search-user %} {% data reusables.enterprise_site_admin_settings.click-user %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %}
- Under "Delete account," in the "Danger Zone" section, click Delete this account.
- In the "Delete account" dialog box, under "Make sure you want to do this", review the changes. To confirm, enter the username of the account to be deleted.
- Click Delete this account.