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
Here are the eight required steps that developers must follow to delete a GitHub repository:
- Ensure you have logged into the GitHub admin console
- Navigate to the Repositories tag
- Select the repository you wish to delete
- Click on the Settings tab
- Move down to the Danger Zone section page
- Click the Delete this repository option
- Type in the name of the repository in the challenge box
- 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
- Learn to rebase onto master and rebase from the master branch
- Squash all Git commits on a branch down to one
- Shelve your changes with Git stash pop and apply
- Easily explain the differences between Git and GitHub
- Add a shallow git clone of depth 1 to your Jenkins jobs
- Set up a local Git server with a bare Git repo