How to delete a GitHub repository example

GitHub repo delete tutorial

After the software development process ends and an application needs to be decommissioned, developers may find themselves in a situation where they need to delete a GitHub repository.

Repository deletion isn’t an onerous task, but GitHub does make developers jump through a minor hoop or two to accomplish it. After all, it shouldn’t be so easy to delete a GitHub repository that it can happen accidentally. But it’s not that difficult either. Just be sure that if a developer wants to delete a GitHub repo that they’re prepared to enter the Danger Zone.

Steps to delete a GitHub repository

delete GitHub repo steps

The section to delete a GitHub repo is literally called the Danger Zone

Here are the eight required steps that developers must follow to delete a GitHub repository:

  1. Ensure you have logged into the GitHub admin console
  2. Navigate to the Repositories tag
  3. Select the repository you wish to delete
  4. Click on the Settings tab
  5. Move down to the Danger Zone section page
  6. Click the Delete this repository option
  7. Type in the name of the repository in the challenge box
  8. Click the Delete button

Post deleted GitHub repository tasks

When a developer deletes a GitHub repository through the Admin console, it doesn’t serve as a Git clean up on any of the developer or DevOps professional’s machines.

However, any attempts to push or pull to the GitHub repository URL of the deleted repo will fail with a ‘repository not found’ error. If a developer wants to delete a user’s instance of a GitHub repository, it would require a manual deletion of all the associated files and folders on a user’s physical machine as well.

Become a Git power user

Want to become a Git power user? Look at the following Git articles and tutorials

App Architecture
Software Quality
Cloud Computing
Security
SearchAWS
Close