@https://devconnected.com/

How to Delete Repository on GitHub

Ishara Silva
3 min readJun 2, 2021

--

Normally, as a software developer, people normally use GitHub repositories in day-to-day life to store and share their projects and codes as well as work with projects as a team.
But sometimes you want to delete some repositories in GitHub. Because some of them are unnecessary and you do not give priority to that.

So, now I tell you, how to delete unnecessary repositories in your GitHub account easily. GitHub doesn’t give a command-line method to delete GitHub repositories. So, you need to delete it manually.
There are some steps to delete it and you have to follow it.

  1. Click on your profile picture at the top right corner and select Your repositories.

2. On your repository list, select the repository that you need to delete.

3. On the selected repository, click the setting icon.

4. After clicking the setting icon, then scroll down to find the Danger zone.

5. After select ‘delete this repository’, open a new window to add username/repository name in the field.

6. Type your username/repository name in the field and click ‘I understand the consequences, delete this repository.’

Okey! now you delete your unwanted repository in your GitHub Account.

How to Delete a Local GitHub Repository

Also, you can delete a local GitHub repository as you wish. All you need to do is delete the .git folder in your project root.

For that, open the command line. Then type the following command:

$ rm -rf <repo_folder>/.git

By deleting the “.git” file, you will delete only the Github repository, not the project folder.

In this article, you learned about how you can easily delete Github repositories. I think it is more important to users of GitHub.

Thanks for reading my article!

--

--

Ishara Silva

A friendly, punctual, dedicated, self-motivated and hardworking IT undergraduate with willing to face new challenges and experience in my life.