How to Delete A Repository in GitHub

GitHub is a development platform that is used by developers to store projects. It is founded on Git, and is used mainly for code development but helps to manage the software development cycle while providing access to a variety of features, such as bug tracking, task management, and wikis.

A repository is where all of your projects’ files are stored, including any revisions you have made. Within the repository, you can manage the work and discuss the project in detail with any or all collaborators. Each repository can be owned by one person or can be shared with others.

If you are the owner of a specific repository you can choose to give other collaborators access, or if the repository is owned by an organization, you may choose to give members within the organization access permission which will allow them to also collaborate on the work within the repository. They can be private or public.

There is no limit to the number of public repositories a person or an organization can own, nor is there a limit to the number of collaborators that may have access. If, however, you are choosing to use GitHub Free, while you can have unlimited access to private repositories you will have a limit on the number of collaborators, three. To add more, you will need to upgrade to GitHub Pro, Team, or Enterprise Cloud.

So, what happens when you have a repository within GitHub that you no longer need or want? You will want to delete it, along with all of its stored files from your GitHub account. Although it does require a few steps, they are relatively easy and as follows.

First, you will need to log into your GitHub account, this will require your login name and password. Depending on how many repositories you have, it will affect the ease of you deleting the repository you want.

For example, the landing page will contain a box that displays your repositories. If you know the name, as you have a limited number, you could just do a quick search and delete it that way. But, let’s assume that you have a lot of repositories in GitHub and take you another way.

On the landing page, you will also notice your avatar, this may be an actual picture, possibly of your organization or it could be a generic avatar. By clicking on this page, it will bring up a dropdown menu where you will select your profile page.

Once you are within your profile you will then click on the tab within the offered menu that is labeled Repositories. After you click on this you will have a couple of options, the first is to scroll all the repositories listed, but this could be tedious depending on the number you have.

The other choice is to enter the name in the search bar and select the one that you want. Keep in mind that there are different types of repositories, or you may have some with similar names, so you may also need to select the type from the offered list.

The options include All, Public, Private, Sources, Forks, Archived, and Mirrors. When you have located the name of the repository you wish to delete you can click on it and you will then be taken to the page for that specific repository.

Below the name of the repository, you will see a settings button. At the bottom of the page, you will need to enter the Danger Zone (cue the theme song to the movie Top Gun). Within this zone, there are a variety of options, from transferring ownership, archiving, and what you ultimately want, Delete This Repository.

Of course, there is a safety precaution the moment you select this choice; it will ask you if you are sure, to which, if you are, you must type in the name of the repository name to double ensure that this is your ultimate desire.

Once you have typed in the name you will then click on the button that says, I Understand the Consequences, Delete This Repository. Once complete, you will be taken back to the home page with a confirming message that the repository you have selected has indeed, been deleted. That’s it, you’re golden.