In this article we are going to cover How to Delete GitHub Repository/ How to Remove Repository GitHub, How to Delete GitHub Repository Command Line.
Things to understand before deleting a repository in GitHub:
- Once a repository is deleted, we cannot restore it again. So we have to think twice make sure about deleting the repository in GitHub.
- If your repository is private repository then all forks will get deleted with the repository in GitHub.
- If your repository is a public repository then the forks will not be deleted in GitHub.
- We can delete the repository if we have admin permission.
Table of Contents
Step #1: Go to your GitHub account and Sign in
Login to GitHub with your GitHub username and password, once logged in As we can see a icon at right top corner, we have click on that icon and has to select on “Your repositories”.
Step #2: Select GitHub Repository to Delete
Here you will see list of all repositories in your current GitHub account, Click on the particular repository which you have to delete.
In this case we have only one repository i.e. intern2021, Click on “intern2021”.
Step #3: Go to GitHub Repo settings
After clicking on repository (intern2021) we can see a code tab issues tab, etc and at last there is a settings tab. Click on “settings”.
Step #4: Delete GitHub Repository
After clicking on settings, go at the bottom on that page, After going at bottom we see a section named Danger Zone, In that section there is last option – Delete this repository, Click on “ Delete this repository”.
After clicking on Delete this repository, GitHub will ask you- Are you absolutely sure?
Type the github repo name to delete in textbox to confirm, and click on “I understand the consequences, delete this repository”
Step #5: To delete the GitHub repository, GitHub will ask for password for authentication
To delete the GitHub repository, GitHub will ask for password for authentication.
Enter your password and click on “Confirm password”.
GitHub Repository “intern2021” is deleted successfully.
How to Delete GitHub Repository Command Line
To Delete GitHub Repository Command Line, run below command.
rm -rf .git
We have covered How to Delete GitHub Repository/ How to Remove Repository GitHub, How to Delete GitHub Repository Command Line.