How to Delete a GitHub Repository

Rajat Hardy
Written by
Last update:

Step 1: Log In to GitHub

When you delete a GitHub repository, it is very important to do that in the correct manner. The reason you can not just delete a GitHub repository account is because it does not remove the entire repository on GitHub. It simply removes your access to that repository.

You can see this easily if you create a repository and then delete your account. The repository will remain on GitHub. If you created the repository, then you can open another GitHub account and add the repository back to your account.

Even if you have several sites or blogs that you want to contribute to, or you want to contribute to a site but you do not want your identity tied to it, having an additional account makes it easy to manage. The way the delete account page describes it is as if you are a member of a GitHub project. You no longer want the privileges of being able to add, modify, or delete your sites or blogs from GitHub, so you remove your accounts from the project.

Why Do You Want to Delete a Repository?

If you’re finished with a particular code repository, you should think about deleting it. Deleting a repository may be as easy as clicking a button. Deleting the entire repository, however, simply removes the files from GitHub. There’s also the potential to delete the files from the other repositories that you have access to.

Deleting the repository will cause the entire project history to disappear from the website. However, no one will be able to see what you deleted except you and the people who you worked with directly.

If you’re unsure about whether or not you should delete a repository, you should consider keeping it. If you enjoy working with particular people, it’s often better to make sure that you have a copy of your code repository. This way, the next time you want to work with them, you have everything ready to go.

Another reason why you may want to keep a repository is for archival purposes. You never know what you’re going to want to know in the future. If you’re interested in a particular project but can’t remember the name of the user or the name of the project, deleting the repository is going to make it difficult to find in the future.

Step 2: Click on Your Avatar in the Upper Right Corner and Then “Your Profile”

Although GitHub was designed for developers to share their code with each other, it’s used on a regular basis by photographers and digital artists looking to share their work on a platform that’s free and readily accessible.

While this can be a great way to market your work, it’s also important to realize that GitHub has a page on its website explaining how to delete your GitHub profile. Because deleting a GitHub profile is easy, it’s incredibly important to realize that the removal process doesn’t completely go away. All traces of it will be removed from the main website, but if someone is smart enough, they can still see a list of commits on your GitHub profile.

In the past, people whose profiles were deleted were unable to update their social security number on the site, but they’ve updated their system, so whether this affects you is hard to say.

Although there are a lot of other ways to distribute your work like on social networks and art marketplaces, GitHub is a great resource for developers. Because of that, it’s an essential part of any developer’s ecosystem.

Step 3: Click on “Repositories” in the Menu to the Right of Your Profile Image

Step 4: Scroll Repositories or Use the Search Bar and Click the Repository in Question

Once you’ve found the repository that you want to delete, click the “Settings” tab.

Scroll to the bottom of the page and click the “Delete” button. This takes you to the repository deletion page. Here, you can skip the delete if you’ve changed your mind. Once you’ve confirmed that you want to go ahead, click the “Delete Repository” button. This redirects you to a confirmation page.

You’ve successfully deleted your repository. If you’ve accidentally deleted the wrong repository, don’t worry. It’s possible to get it back, but you’ll need to follow some steps outlined by GitHub on the help page instead of the ones we’ve outlined here.

Congratulations! Now you know how to delete a GitHub repository.

Step 5: Click “Settings” in the Menu Directly Below the Repository Name

Once you’ve successfully navigated to your repository, you will be presented with a page with a few tabs on the left side of the screen, the first of which is Settings.

This section is where you’ll be able to change almost anything about your repository. The settings pages are very thorough and have a lot of options, but to delete the repository, you only need to scroll down to the bottom and press the “Delete” button.

It is also important to note that any time you do press this button, it is permanent. You will not be able to bring the repository back, so be sure that you’re really wanting to delete it before you continue.

Step 6: Scroll Down to the “Danger Zone” and click “Delete this repository”

At this point, you have to enter your name (or GitHub username), and verify your identity with your email address. If you’re logged in with your username, you’ll likely get a warning that “you’re trying to do something that only owners can do.” If that’s the case, enter in your email and follow the prompts to confirm your identity.

The last step is to click “Delete repo,” and you’ll receive a confirmation that your GitHub repository will be deleted. Since this is a one-way street, you can’t unsend the request, and the repository will be permanently removed from GitHub.

Step 7: Type the Name of the Repository into the Pop-Up Window that Appears and Click the “I understand the consequences, delete this repository” button