You cannot directly delete a user account on GitHub. GitHub does not offer a feature to delete user accounts. However, you can achieve a similar result by archiving or deactivating the account.
Archiving a GitHub Account
Archiving a GitHub account makes it inactive and removes it from public search results. This means that the account will no longer be visible to others, and the user will not be able to access their repositories or contribute to projects.
To archive a GitHub account:
- Go to your GitHub settings page.
- Click on Account.
- Scroll down to the Account privacy section and click Archive Account.
- Enter your password to confirm the action.
Deactivating a GitHub Account
Deactivating a GitHub account is a more permanent option than archiving. This action will permanently remove the account and all associated data from GitHub.
To deactivate a GitHub account:
- Go to your GitHub settings page.
- Click on Account.
- Scroll down to the Account privacy section and click Deactivate Account.
- Enter your password to confirm the action.
Note: Once a GitHub account is deactivated, it cannot be recovered.
Deleting a GitHub Account for an Organization
If you are an organization administrator, you can delete a user account from your organization. However, you cannot delete the user's personal GitHub account.
To delete a user account from an organization:
- Go to your organization settings page.
- Click on People.
- Find the user you want to delete and click Remove from organization.
Note: This will only remove the user from the organization, not delete their personal GitHub account.