How To – Delete a Repository from GitHub

How to delete a repository on GitHub

When you are dealing with GitHub you will always find suggestions on how to create new repositories, manage versions, add and update the code, but never how to delete a repository. In this How To you will see in a few steps how to delete a repository, or a fork that you have created and no longer want to store in GitHub.

Removal of a repository from GitHub

First, if you want to delete a github repository, you must have the requirements to do it. The procedure also applies to forks.

Secondly, you must be convinced of what you are doing, because the process is completely irreversible. All data contained within the repository will be permanently deleted.

Once you have clarified these two small premises, let’s see what it consists of and what it means to remove a repository from GitHub.

  • Deleting a private repository will delete all the forks related to it.
  • Deleting a public repository will not delete the forks related to it.
  • Deleting all private repositories will not downgrade your account to free.

It is clear that if the repository we created is public, and other users have created a fork (ie they started from a copy of our repository) and have more or less developed new projects or new versions from our code, it will not be possible more eliminate them.

The procedure

Connect to GitHub and select the repository you want to delete.

For example, in my case I selected the Spoon-Knife repository (a fork I’m not interested in anymore).

How to remove a repository on GitHub 01

After loading the main repository page, click on Settings.

How to remove a repository on GitHub 02

The repository settings page will be loaded. Go to the bottom of the page and in the Danger Zone section, click on Delete this repository.

How to remove a repository on GitHub 03- delete the repository

Once you press the button you will see a small window that will warn you that the removal will be permanent and irreversible. And for security, it will ask you to insert the name of the repository you want to remove in a text box.

How to remove a repository on GitHub 04 - confirm

Only once you have entered the name in the text box, the bottom button “I understand the consequences, delete this repository” will be enabled. Press it and the repository will be permanently removed.[:]



Leave a Reply