How to Delete a Repository on GitHub

Deleting a GitHub repository is a serious action — once completed, the repository and all its contents are permanently removed and cannot be recovered (unless you have backups or forks).

Whether you’re cleaning up unused projects or reorganizing your workspace, here’s a step-by-step guide to properly delete a GitHub repository.


⚠️ Before You Begin

  • Ensure you have admin access to the repository.
  • Backup any important data — clone the repo locally or export as a ZIP.
  • This action cannot be undone unless you have a local copy or a fork.

✅ Step-by-Step: How to Delete a GitHub Repository

1. Log in to GitHub

Go to https://github.com and sign in to your account.


2. Navigate to the Repository

  • From your GitHub home page or profile, click on the repository you want to delete.

3. Go to Repository Settings

  • On the right side of the repository page, click on the Settings tab (you must be on the main page of the repo, not inside a folder or file).

4. Scroll Down to the Danger Zone

  • Scroll all the way down to the section labeled Danger Zone.
  • Find the “Delete this repository” option.

5. Click “Delete this repository”

  • GitHub will prompt you to confirm.

You will be asked to:

  1. Type the name of the repository (to confirm you’re deleting the correct one).
  2. Click a final confirmation button.

6. Enter Your GitHub Password (if prompted)

GitHub may ask for your password again to verify your identity, especially for sensitive actions like deletions.


🧾 Alternative: Deleting a Fork

If you’re deleting a forked repository, the process is exactly the same. Deleting your fork does not delete the original upstream repository.


📦 Backup Tip (Optional but Recommended)

To save a copy before deleting:

git clone https://github.com/username/repo-name.git
zip -r repo-name-backup.zip repo-name/

Or use GitHub’s “Download ZIP” feature from the repo page.


🧠 Final Thoughts

Deleting a repository is easy but irreversible. Make sure you:

  • Have the correct repo selected.
  • Backup any valuable code or documentation.
  • Notify team members if working in a shared environment.

Once you’re sure, go ahead and clean up your GitHub space!

Sharing Is Caring:

Leave a Comment