GitHub is one of the most popular platforms for software developers to store, manage, and collaborate on code. Sometimes you may need to delete a GitHub repository — maybe it’s outdated, duplicated, or no longer needed.
In this guide, you will learn how to delete a repository in GitHub using mobile, desktop, command line, and the GitHub website.

How to Delete a Repository in GitHub Step-by-Step Guide

What Is GitHub?

GitHub is an online platform used for:

  • Hosting code repositories
  • Version control using Git
  • Team collaboration
  • Pull requests and code reviews
  • Open-source project contributions

GitHub allows developers to manage source code efficiently and track every modification. It supports public and private repositories.


🗑️ How to Delete a Repository in GitHub (Quick Steps)

GitHub allows you to delete only repositories you own. Deletion is permanent and irreversible.

Steps:

  1. Log in to GitHub
  2. Open the Repository
  3. Click Settings (⚙️)
  4. Scroll to Danger Zone
  5. Click Delete this repository
  6. Type the repository name
  7. Confirm delete

📱 How to Delete a Repository in GitHub Mobile

GitHub mobile app does NOT support repository deletion directly.
However, you can delete it using a mobile browser.

Steps (Mobile Browser):

  1. Open Chrome/Safari
  2. Go to github.com and enable Desktop Site
  3. Login → Open repository
  4. Tap Settings
  5. Scroll to Danger Zone
  6. Tap Delete this repository
  7. Confirm by typing the repo name
  8. Tap I understand the consequences, delete this repository

💻 How to Delete a Repository in GitHub Desktop

GitHub Desktop cannot delete repositories from GitHub directly — it only manages local repositories.

To delete using Desktop:

1. Delete Local Repo (Optional)

  • Open GitHub Desktop
  • Choose repository
  • Click Repository → Remove

2. Delete Cloud Repo

You must use GitHub website to delete the online repository:

  • Open repo in browser → Settings → Danger Zone → Delete

GitHub Desktop does not have a delete button for cloud-hosted repositories.


🧑‍💻 How to Delete a Repository in GitHub Using Command Line

You can delete a repository using GitHub CLI.

Step 1 – Install GitHub CLI

https://cli.github.com

Step 2 – Login

gh auth login

Step 3 – Delete Repo

gh repo delete username/repository-name

You will be asked:

? Are you sure you want to delete "username/repository-name"? (y/N)

Enter:

y

Your repository is deleted instantly.


🌐 How to Delete a Repository in GitHub Website (Most Common Method)

Steps:

  1. Go to github.com
  2. Login to your account
  3. Open the repository
  4. Click Settings
  5. Scroll to bottom → Danger Zone
  6. Click Delete this repository
  7. Type repo name
  8. Confirm delete

This method works on all devices, including mobile and PC.


🔗 Internal Links (as requested)


🏁 Conclusion

Deleting a GitHub repository is simple whether you’re on mobile, desktop, command line, or the GitHub website. Just remember that deletion is permanent and cannot be undone. Always create backups before deleting important repositories.


FAQs – How to Delete a Repository in GitHub

1. Can I recover a deleted GitHub repository?

No. Once deleted, it cannot be recovered.

2. Can I delete a repository from GitHub Desktop?

No. GitHub Desktop does not support cloud repo deletion. Use GitHub website.

3. How do I delete a repository in GitHub mobile?

Use the mobile browser → Enable desktop mode → Delete from Settings.

4. How to delete a repo using command line?

Use GitHub CLI:

gh repo delete username/repository-name

5. Can I delete someone else’s repository?

No. You can only delete repositories that you own.

Leave a Reply

Your email address will not be published. Required fields are marked *