Managing your projects on GitHub often means starting new repositories, archiving old ones, or occasionally, deleting a repository entirely. Whether you’re cleaning up outdated projects or removing sensitive content, deleting a GitHub repository is a permanent action—so it’s important to do it carefully.
In this guide, we’ll walk you through how to safely and securely delete an existing GitHub repository in just a few steps.
⚠️ Before You Begin: Important Notes
- Deleting a repository is permanent: You can’t undo it unless you have a local backup or a fork.
- All associated issues, pull requests, wikis, and settings will also be deleted.
- If the repository is public, forks will remain, but your original source will be gone.
✅ Tip: Consider archiving a repository instead if you just want to make it read-only.
✅ How to Delete a GitHub Repository
Step 1: Sign In to GitHub
Go to https://github.com and log in to your account.
Step 2: Navigate to the Repository
- Click on your profile icon in the top-right corner.
- Go to “Your repositories”.
- Select the repository you want to delete.
Step 3: Open Repository Settings
- Inside the repository, click the “Settings” tab (found in the top menu).
- Scroll down to the bottom of the settings page.
Step 4: Delete the Repository
- Find the section labeled “Danger Zone.”
- Click the “Delete this repository” button.
- GitHub will ask you to confirm by typing the repository name.
- Type the full repo name (e.g.,
username/repository-name
) and click “I understand the consequences, delete this repository.”
Step 5: Verify Deletion
Once deleted, you’ll be redirected, and the repository will no longer be accessible.
🔐 Extra Tips for Private or Organization Repositories
- You must have admin access to delete a repository.
- For organization-owned repositories, only owners or users with the proper permissions can delete the repo.
- GitHub may prompt for two-factor authentication (2FA) if you have it enabled.
🧠 Summary
Action | Steps |
---|---|
Navigate to Repo | GitHub → Your Repositories → Select Repo |
Go to Settings | Top tab inside the repo |
Delete | Scroll to Danger Zone → Click Delete Repository |
Confirm | Type repo name → Confirm deletion |
✅ Final Thoughts
Deleting a repository on GitHub is straightforward but irreversible, so always double-check before proceeding. If you’re not sure whether to delete, consider options like archiving or making the repository private instead.
Cleaning up old projects is a great way to stay organized, especially as your portfolio or development work grows.