To delete a GitHub repository, go to the repository's Settings tab, scroll all the way down to the Danger Zone section, and click 'Delete this repository'. You must type the full repository name to confirm. Deletion is permanent — all code, issues, pull requests, and settings are removed and cannot be recovered. Before deleting, disconnect any integrations (Lovable, Vercel, etc.) and consider archiving instead.
What Happens When You Delete a GitHub Repository
Deleting a repository is one of the most irreversible actions on GitHub. When you delete a repository, the following are permanently removed:
- All code and files - All branches and tags - All pull requests, issues, and discussions - All GitHub Actions workflows and their run history - All settings, webhooks, and deploy keys - All GitHub Pages sites hosted from the repository
GitHub does offer a brief recovery window (around 90 days for some data), but you should treat deletion as permanent.
Before deleting, consider whether **archiving** is a better option. An archived repository is read-only — the code is preserved, the URL still works, but no one can push new changes or open issues. Archiving is completely reversible.
If your repository is connected to external services like Lovable, Vercel, Netlify, or Cursor, disconnect those integrations first. Otherwise, those tools may show errors when they try to sync with a repository that no longer exists.
Prerequisites
- A GitHub account with owner permissions on the repository
- The repository you want to delete (you must be the owner or an organization admin)
Step-by-step guide
Disconnect external integrations first
Disconnect external integrations first
Before deleting, check if your repository is connected to any external tools. If it is connected to Lovable, open Lovable, go to the GitHub icon (top-right), and disconnect the repository. For Vercel, go to vercel.com → your project → Settings → Git, and click 'Disconnect'. For Netlify, go to your site → Site settings → Build & deploy → Link to a different repository. For V0, disconnect via the Git panel. Disconnecting prevents these tools from throwing errors after the repository is deleted.
Expected result: All external integrations are disconnected from the repository.
Consider archiving instead of deleting
Consider archiving instead of deleting
If you might need the code later, archive the repository instead of deleting it. Go to your repository on GitHub.com, click the 'Settings' tab (gear icon in the top navigation). Scroll down to the 'Danger Zone' section. Click 'Archive this repository'. Confirm by clicking 'I understand the consequences, archive this repository'. The repository becomes read-only — all code and history are preserved, but no new changes can be made. You can unarchive at any time by returning to this same setting.
Expected result: The repository is archived (read-only) and a banner at the top says 'This repository has been archived by the owner. It is now read-only.'
Navigate to the repository settings
Navigate to the repository settings
If you have decided to delete (not archive), go to your repository on GitHub.com. Click the 'Settings' tab in the top navigation bar — it is the last tab on the right (gear icon). You must be the repository owner to see this tab. If you do not see it, you do not have permission to delete the repository.
Expected result: You are on the repository's Settings page, showing the 'General' settings section.
Scroll to the Danger Zone and click delete
Scroll to the Danger Zone and click delete
Scroll all the way to the bottom of the Settings page. You will see a section with a red border labeled 'Danger Zone'. This section contains several destructive actions. Find the button that says 'Delete this repository' and click it. A confirmation dialog appears warning you that this action is permanent and cannot be undone.
Expected result: A confirmation dialog appears asking you to type the repository name.
Type the repository name to confirm deletion
Type the repository name to confirm deletion
The confirmation dialog asks you to type the full repository name (in the format username/repository-name) to confirm you understand what you are deleting. Type it exactly as shown — it is case-sensitive. Once the text matches, the 'I understand the consequences, delete this repository' button turns red and becomes clickable. Click it. The repository is deleted immediately, and you are redirected to your GitHub dashboard.
Expected result: The repository is permanently deleted. You are redirected to your GitHub dashboard, and the repository no longer appears in your repository list.
Complete working example
1# Repository Deletion Checklist23## Before you delete, verify:45### Connected Services6- [ ] Lovable disconnected (GitHub icon → disconnect)7- [ ] Vercel disconnected (Project Settings → Git)8- [ ] Netlify disconnected (Site settings → Build & deploy)9- [ ] V0 disconnected (Git panel)10- [ ] Custom domains removed11- [ ] Webhooks reviewed (Settings → Webhooks)1213### Data Backup14- [ ] Code downloaded (green Code button → Download ZIP)15- [ ] Issues exported (if needed)16- [ ] Wiki pages saved (if applicable)1718### Consider Alternatives19- [ ] Would archiving (read-only) work instead?20- [ ] Could I transfer ownership instead of deleting?21- [ ] Do other team members need anything from this repo?2223### Final Confirmation24- [ ] I understand deletion is PERMANENT25- [ ] I have the owner/admin role26- [ ] I have typed the repository name correctlyCommon mistakes when deleting a Repository in GitHub
Why it's a problem: Deleting without disconnecting Lovable, Vercel, or other integrations first
How to avoid: Always disconnect external services before deleting. Otherwise, they will show sync errors until you manually remove the connection on their end.
Why it's a problem: Deleting instead of archiving
How to avoid: If there is any chance you might need the code later, archive the repository instead. Archiving is reversible; deletion is not.
Why it's a problem: Thinking you can recover a deleted repository easily
How to avoid: GitHub's recovery window is limited and not guaranteed. Treat deletion as permanent. Download a ZIP backup before deleting if you want to keep the code.
Why it's a problem: Trying to delete a repository you do not own
How to avoid: Only the repository owner (or organization admin) can delete a repository. If you do not see the Settings tab, you do not have the required permissions.
Best practices
- Always disconnect external integrations (Lovable, Vercel, Netlify) before deleting
- Download a ZIP backup of the code before deleting — click the green 'Code' button → 'Download ZIP'
- Consider archiving instead of deleting if you might need the code later
- Check for open pull requests and issues that collaborators may need
- Inform team members before deleting a shared repository
- Review webhooks in Settings → Webhooks to identify connected services
- If the repository hosts a GitHub Pages site, understand that the site will go offline immediately
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to delete a GitHub repository but I am worried about losing important data. Walk me through what gets deleted, how to back up the code, and the step-by-step process to delete using only the GitHub website.
Frequently asked questions
Can I recover a deleted GitHub repository?
GitHub has a limited recovery window (approximately 90 days) for some repository data, but it is not guaranteed. Contact GitHub Support immediately if you need recovery. Do not count on this — always back up before deleting.
What is the difference between deleting and archiving?
Deleting permanently removes the repository and all its data. Archiving makes it read-only — the code, issues, and history are preserved, but no one can make new changes. Archiving is reversible; deletion is not.
Do I need to delete the repository to stop using it?
No. You can archive it (read-only), make it private (only you can see it), or simply stop working on it. Deleting should be a last resort.
What happens to forks of my repository if I delete it?
Forks created by other users will continue to exist independently. They are not deleted when you delete the original repository.
Will deleting the repository stop my Vercel or Netlify deployment?
The existing deployment may stay online temporarily, but it will not receive updates and may eventually show errors. Disconnect the integration and delete the deployment on the hosting platform separately.
Can RapidDev help migrate my repository before deleting it?
Yes. RapidDev can back up your repository, migrate code to a new project, disconnect integrations properly, and ensure nothing is lost before you delete the old repository.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation