How to Delete a GitHub Repository (Web + CLI)

GitHub repository deletion tutorial showing step-by-step process for removing repos online

To delete a repository on GitHub, go to the repository’s Settings tab, scroll to the Danger Zone at the bottom, click Delete this repository, and confirm by typing the full repository name. The deletion is instant and permanent — there is no undo button.

Applies to: GitHub web (github.com) | Last updated: May 27, 2026

How to Delete a Repository on GitHub

Key Takeaways

  • Deletion is permanent — all code, commit history, issues, pull requests, wikis, and Actions workflows are removed immediately with no recovery option through GitHub
  • You need admin or owner permissions — if the Settings tab is not visible, you do not have the required access level
  • GitHub requires you to type the full repo name to confirm — the format is username/repository-name, and it is case-sensitive
  • Forks are not affected — if others have forked your repo, those forks remain intact after deletion
  • GitHub CLI alternative: gh repo delete <owner>/<repo> — one command from your terminal if you have the GitHub CLI installed

In This Guide

This guide covers two ways to delete a GitHub repository:

Quick Steps

  1. Log in to GitHub and open the repository you want to delete
  2. Click the Settings tab (top right of the repo page)
  3. Scroll to the bottom — find the Danger Zone section
  4. Click Delete this repository
  5. Click I want to delete this repository to continue
  6. Type the full repo name in the format username/repository-name
  7. Click Delete this repository — done, it’s gone immediately

Method 1: Delete a Repository on GitHub Web

This is the method I walk through in the video above. It takes about 30 seconds once you are in the right place.

Step 1: Open the Repository

Log in to your GitHub account at github.com and navigate to the repository you want to delete. You can find it in the repository list on the left side of your dashboard, or by searching for it directly.

Step 2: Go to Repository Settings

On the repository page, click the Settings tab in the navigation bar at the top right — it is the last item, next to Insights. If you do not see the Settings tab, you do not have admin or owner permissions on this repository. You will need to contact the repo owner to request deletion or elevated access.

Step 3: Scroll to the Danger Zone

Scroll all the way down the Settings page until you see a red-bordered section labeled Danger Zone. This section contains destructive actions — archiving, visibility changes, and deletion. GitHub places it at the very bottom intentionally so you cannot stumble into it accidentally.

Step 4: Start the Deletion

Click Delete this repository in the Danger Zone. A dialog will appear explaining what will be deleted. Click I want to delete this repository to proceed to the final confirmation step. GitHub will warn you again that this action is permanent — take a moment to make sure you have the right repository open.

Step 5: Confirm by Typing the Repository Name

GitHub requires you to type the full repository name to confirm you know exactly what you are deleting. The format is:

username/repository-name

This is case-sensitive, so type it exactly as shown. Once you have typed it correctly, the Delete this repository button becomes active. Click it, and the repository is deleted immediately.

Tip: If you are having trouble typing the name correctly, copy it from the confirmation dialog — GitHub shows the exact string you need to enter right above the text field.

What Gets Deleted — and What Does Not

When you delete a repository on GitHub, the following are permanently removed: all code and file history, every branch, all commit history, open and closed issues, pull requests, project boards, wikis, GitHub Actions workflows and their logs, and any GitHub Pages site hosted from the repository.

What is not deleted: any local clones on your computer or teammates’ machines remain intact. If the repository had been forked by other users, those forks survive and continue to exist independently — the oldest fork typically becomes the new network root.

Note: Any links or bookmarks pointing to the deleted repository will return a 404 error. If you had GitHub Pages enabled, that site will also go offline immediately.


Method 2: Delete a Repository Using the GitHub CLI

If you have the GitHub CLI installed and authenticated, you can delete a repository with a single command. This is especially useful if you are managing multiple repositories or working in a terminal-heavy workflow.

gh repo delete <owner>/<repo> --yes

Replace <owner> with your GitHub username (or organization name) and <repo> with the repository name. The --yes flag skips the interactive confirmation prompt — leave it off if you want CLI to ask before deleting.

Note: The GitHub CLI requires the delete_repo OAuth scope. If you see a permission error, run gh auth refresh -s delete_repo to add this scope to your token.

If you are new to the GitHub CLI and want to get started with it, I have a guide on using AI-powered coding workflows that covers setting up developer tools on Windows, including VS Code and terminal tooling. I also have a guide on how to download and install VS Code on Windows 10/11 if you are setting up your dev environment from scratch.

Common Issues When Deleting a GitHub Repository

Settings tab is not visible

The Settings tab only appears if you have admin or owner permissions on the repository. If you are a collaborator with write access only, you will not see it. Contact the repository owner to either grant you admin access or delete the repository themselves.

Delete option is unavailable in an organization

Organization repositories can have policies that restrict deletion to organization owners only. If you are an organization member or even a repository admin, you may still be blocked. Check with your org owner — they can either delete it or adjust the repository deletion permissions in the organization’s Settings under Member privileges.

Cannot type the repository name — button stays grayed out

The name is case-sensitive and must match exactly. The required format is username/repository-name — including your username, not just the repo name. Copy the exact string from the confirmation dialog to avoid typos.


Frequently Asked Questions

Can I recover a deleted GitHub repository?

No — repository deletion is permanent. GitHub does not provide a recovery option through the web interface. If you have a local clone on your machine, you can push it to a new repository, but any issues, pull requests, and commit history beyond your local clone are gone for good. This is why GitHub makes you type the full repository name before allowing deletion.

What happens to people who forked my repository?

Forks are not deleted when you delete the original repository. They continue to exist as independent repositories on GitHub. The oldest fork in the network typically becomes the new root. If you want to also remove forks, each fork owner would need to delete their own copy separately.

Can I delete a repository from the GitHub mobile app?

No, repository deletion is not available in the GitHub mobile app. You need to use the GitHub website in a browser — desktop or mobile browser both work, as long as you can access the Settings tab.

What is the difference between archiving and deleting a repository?

Archiving makes the repository read-only — the code and history are preserved, but no one can push changes or open new issues. It is the right choice when you want to retire a project without losing its history. Deleting removes everything permanently. The Archive option is right above the Delete option in the Danger Zone.

Does deleting a repository affect my GitHub contribution graph?

Yes. Commits and contributions from a deleted repository are removed from your profile’s contribution graph. Stars and forks the repository had accumulated are also gone. If that matters to you, consider archiving instead of deleting.

Similar Posts