How to Delete A Repository in GitHub

Creating new repositories on GitHub for pet projects can quickly become addicting because of the platform’s widespread use as an online portfolio. If you have stored too many repositories in your GitHub account and would like to clean things up a bit, continue reading to find out how to remove a repository.

Table of Content

Things You Should About Deleting Repository GitHub

  • If you are the owner of the organization or if you have admin permissions for the repository or fork in question, you can delete it. However, there are a few details to remember:
  • When a fork is deleted, the original repository is unaffected. When a private repository is deleted, any forks that were created from it are also removed, but when a public repository is removed, the forks remain intact.
  • When you delete a repository, all of the associated wikis, problems, and comments will also be deleted. Once a repository is erased, it cannot be recovered.

How to Delete a Repository in GitHub

If you have read the notes about deleting the repository on GitHub, you can now follow the steps below:

  1. Launch GitHub and sign in to your account to start the removal procedure.
  2. To access your repositories, go to your profile by clicking the profile button in the upper right.
  3. To remove a repository, simply locate it here and click on its name. Then, select the Settings tab from the toolbar.

  4. To reach the Danger Zone, please scroll down to the very bottom of the page. Select the option to delete the current repository.

  5. A confirmation window will now appear, asking if you are sure you want to remove the repository. You can delete the repository by typing its name in the text field and then clicking the I understand the consequences, delete this repository button.


    Note: You can always archive the repository instead of erasing everything if you’re hesitant about erasing everything. Use the option to Archive this repository from the same Danger Zone section. Although other users will be unable to make changes, the repository can still be forked. Simply returning to the repository’s settings page and selecting Unarchive this repository will bring it back to life.
  6. After deleting the repository, you’ll be returned to the GitHub home page, with a banner at the top informing you that the repository was successfully deleted.
See Also  How to Pull All Branches from GitHub, Easy Guide for Beginners!

How to Restore A Deleted Repository in GitHub

If a deleted repository was not part of an empty fork network, it can be recovered within 90 days. A fork network includes the original repository, all of its forks, and all of the forks. To get your repository back online if it was part of a fork network, all the other repositories in the network must be destroyed or detached from the network. Click “About forks” for additional details.

Contact GitHub Support if you want to restore a repository that was once part of a fork network but is not currently empty. After a repository is deleted, it may take up to an hour before it can be restored. Both release attachments and team permissions will be lost if a repository is restored. Resolved problems won’t be marked as such.

There are two ways to restore a deleted repository in GitHub, which are from a personal account and an organization account. Follow through the steps below!

Restoring a deleted repository on Personal Account

  1. Click your profile picture at the top right of any page, then select Settings from the drop-down menu that appears.

  2. Select Repositories from the sidebar’s “Code planning, and automation” option.
  3. To view the deleted repositories, select that option from the “Deleted Repositories” menu.

  4. In the list of repositories, select the one you wish to restore and then click the Restore button.

  5. When you’re done reading the cautionary message, select the “I understand, restore this repository” option.

Restoring a deleted repository on Organization Account

  1. To view your organization’s repositories on GitHub.com, click your profile picture in the upper right corner and select Your Organization.

  2. Select Preferences beside the company.

  3. The link to Deleted Repositories can be found in the sidebar to the left.

  4. In the list of repositories, select the one you wish to restore and then click the “Restore” button.

  5. When you’re done reading the cautionary message, select the “I understand, restore this repository” option.
See Also  How to Upload Files to GitHub? 2 Easy Methods to Try!

Tips

If you need to customize your repository on GitHub, you can do many things. These are the things you can do in customizing your repository.

  • Changing your default text editor associated with GitHub.
  • Changing your dotfiles.
  • Installing Hub for your repo.
  • Practicing the merge conflicts.
  • Creating a GitHub Page.

Share This Post

Newest Articles

How to Get a GitHub Access Token for Personal Access

No longer have access to your personal GitHub repository? You can use the GitHub Access Token to open it. Read the full guide here!

How to Make a GitHub Repository Private

Developers can now create a private GitHub repository in the free tier as of January 7, 2019. Read how to get the private repository feature on GitHub here!

3 Methods of How to Install Android SDK Repository

Android is one of the most used operating systems for software development. Read the full guide on how to get the Android SDK here!

How to Turn Off Android Developer Mode

Android Developer Options allows you to access hidden features. If you want to deactivate it, follow this simple guide to turn it off!

5 Simple Ways How to Get Cookie Clicker GitHub

How to get and use Cookie Clicker on GitHub? You can find the simple steps and cheats for Cookie Clicker in this article!

How to Integrate Jira with GitHub in 6 Easy Steps

If you use Jira for your work and need to integrate with another organization that uses GitHub, integration is what you require. Read the details here!