Git is a powerful and popular tool used to create most of the apps and software products on the market. Programmers and other digital project creators utilize Git, which is a version control system that manages and stores the revision of projects. GitHub is a repository hosting service that allows creators who use Git to keep every iteration of their projects in one interface.
Ease of collaboration, code sharing, and software publishing widgets have turned GitHub into a social platform of sorts. If you understand how Git and GitHub work, then you have undoubtedly heard the term “repository” or “repo” as it is sometimes referred. For beginners, a repository is storage unit or space that holds data. Images, code, text, and most other forms of digital information can be stored in a repository.
There are a wealth of tutorials instructing users how to set up a repository, but not as many teach how to remove one. Here is the 7-step process to delete a repository in GitHub.
- Log In to GitHub
- Click on Your Avatar in the Upper Right Corner and Then “Your Profile”
- Click on “Repositories” in the Menu to the Right of Your Profile Image
- Scroll Repositories or Use the Search Bar and Click the Repository in Question
- Click “Settings” in the Menu Directly Below the Repository Name
- Scroll Down to the “Danger Zone” and click “Delete this repository”
- Type the Name of the Repository into the Pop-Up Window that Appears and Click the “I understand the consequences, delete this repository” button
If you are less familiar with the GitHub interface, here are all of the steps explained in greater detail along with screenshots to provide a visual walkthrough.
Step 1: Log In to GitHub
When you have the GitHub website pulled up, click on “Sign In” in the top right-hand corner of the page. Make sure to have your username and password handy. Once you’re logged in, a new page will load.
Pro Tip: If you don’t have many repositories, look for the box on this landing page (see screenshot below). A quick search could pull up the repository you wish to delete quickly. If so, click on the repository and skip to step number five.
Step 2: Click on Your Avatar in the Upper Right Corner and Then “Your Profile”
Many GitHub users will have dozens, possibly hundreds, of repositories. A large number of data to search through may require a more detailed process. In order to find a specific repository among many others, you will have to go to your GitHub profile. To do so, click on your picture or the generic avatar in the top right corner of the homepage. A dropdown menu will appear. Click “Your Profile” and you will be taken to your profile page.
Step 3: Click on “Repositories” in the Menu to the Right of Your Profile Image
Once you are on the profile page, you’ll see several menu options to the right of your image. There will also be a list of popular repositories that are commonly used. It’s not likely that you’ll want to delete a popular repo and will need to click on “Repositories” header for further search.
Step 4: Scroll Repositories or Use the Search Bar and Click the Repository in Question
On this page, you’ll be able to scroll through your repositories. However, with many names, it will be easier to enter the name in the search bar and press the enter/return key.
To the right of the search bar is a button that allows you to choose the type of repository to search. Click on it to see a list of categories that may narrow the results further. If there are hundreds of repositories with similar file names, sorting by type may be necessary. Once you find the repository you wish to delete click on it and you’ll be taken to that specific repo page.
Step 5: Click “Settings” in the Menu Directly Below the Repository Name
Once you’re on the page of the repository you wish to delete, find and click the header labeled “Settings” located on the right-hand side of the menu.
You will then be taken to the settings page for this specific repository. Below is a screenshot to make sure you are in the right place.
Step 6: Scroll Down to the “Danger Zone” and click “Delete this repository”
The settings page of a repository has many subsections and options, but the section you need is very close to the bottom of the page. Scroll down until you see a box outlined in a thin red line. It will be labeled “Danger Zone.” Click the button on the bottom right corner of the box labeled “Delete this Repository.”
Once you click the button to delete the repo, a pop-up window will appear.
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
Typically, repositories can hold vast amounts of data, even entire applications. Deletion is a rare occurrence. For this reason, you will have to enter the specific name of the repository you want to remove permanently in the pop-up window. Once that name is entered correctly, the button below will turn bright red. Now, you will click the button that says “I understand the consequences, delete this repository.”
If done properly, you will be rerouted back to the landing page you were on after you logged into GitHub. At the top of the page, directly under the “Search GitHub” bar, you should see a message stating that your repository was successfully deleted.