Loading
Loading
  • Home

  • Productivity

  • App tips

App tips

3 min read

How to delete a repository in GitHub

By Jessica Lau · October 3, 2023
Hero image with the GitHub logo

Creating new GitHub repositories can get pretty addictive. But if you find yourself with one too many repositories and want to simplify your profile, here's how to delete a repository in GitHub. 

First, the short version. (Keep scrolling for the detailed steps and important things to keep in mind before permanently deleting a GitHub repository.)

  1. Go to the main page of the repository you want to delete. 

  2. Under your repository name, click Settings

  3. In the Danger Zone section, click Delete this repository

  4. A series of pop-ups will appear asking if you want to delete your repository. Click the confirmation buttons, and you're all set. 

What to know before you delete a repository on GitHub

Only GitHub members with owner privileges for an organization or admin permissions for a repository can delete an organization repository or fork (a copy of someone else's repository). But before you hit delete, here are some important things to keep in mind: 

  • Deleting a public repository will not delete any forks of the repository. 

  • Deleting a private repository will delete all associated forks. 

  • Deleting a repository (public and private) will remove all wikis, issues, and comments associated with the repository. 

  • Deleting a fork doesn't affect the upstream (original) repository. 

  • With a few exceptions, there is no way to restore a deleted repository. 

If you're not sure about permanently deleting your GitHub repo, a safer bet is to archive it. This way, you can unarchive it later on and pick up where you left off. 

How to delete a repository in GitHub

  1. Log in to your GitHub account

  2. Click your profile icon, and then select Your repositories.

    How to access your repositories in GitHub.

  3. From your Repositories page, click the repository you want to delete. This will bring you to the main page for your selected repository. 

  4. Click the Settings tab (under your repository name). 

    GitHub repository settings page.

  5. In the Danger Zone section, click Delete this repository.

    How to delete a depository in GitHub.

  6. You'll receive a series of pop-ups asking you to confirm that you're really sure you want to delete your repository.  

    • Click I want to delete this repository

      Delete GitHub repository confirmation pop-up one of three. The confirmation button reads I want to delete this repository.

    • Click I've read and understand these effects

      Delete GitHub repository confirmation pop-up two of three. The confirmation button reads I have read and understand these effects.

    • Enter [your account name]/[name of your repository] (for example, jumuir/new-test-repo). Then click Delete this repository.

      Delete GitHub repository confirmation pop-up three of three. The confirmation button reads delete this repository.

That's it! A banner will appear at the top of your Repositories page to confirm that your repo was successfully deleted. 

A banner across a GitHub Repositories page that confirms a repository was successfully deleted.

How to archive a GitHub repository 

If you don't want to permanently delete all your data, here's how to archive a GitHub repository instead. 

  1. Click your profile icon, and then select Your repositories.

  2. From your Repositories page, click the repository you want to delete. This will bring you to the main page for your selected repository. 

  3. Click the Settings tab (under your repository name). 

  4. In the Danger Zone section, click Archive this repository.

    How to archive a repository in GitHub.

  5. In the pop-up window that appears, enter [your account name]/[name of your repository] (for example, jumuir/new-test-repo). Then click I understand the consequences, archive this repository.

    Pop-up window to confirm that you want to archive a repository in GitHub.

This will put your repository into read-only mode, but other users will still be able to fork it. If you want to bring the repo back to life, go to its Settings page and click Unarchive this repository. It'll then reappear on your Repositories page. 

GitHub repository FAQ

Turns out people have lots of questions about GitHub repositories—like "Why is it so hard to say 'repository'?" Is that just me? Anyway. Here are answers to the most common questions.

What is a GitHub repository?

A GitHub repository (or "repo") contains an entire coding project. It's a central place in GitHub where you can store and manage your project files or share them with others. Coders create repositories to track project changes and allow others to view, edit, or modify their work.

What does it mean to fork a repository in GitHub?

Forking means copying code. If you share your code publicly on GitHub, other coders can either contribute directly to the original code or copy (aka "fork") the code into their own repository. 

Related reading:

This article was originally published in June 2019 by Khamosh Pathak. The most recent update was in October 2023.

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags
mentioned apps

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'