Forking a repository is a great way to contribute to open-source projects or build upon existing code. But if you no longer need a forked repo, you can safely delete it from your GitHub account.
✅ Steps to Delete a Forked Repository
- Log in to GitHub
Go to https://github.com and sign in to your account. - Navigate to the Forked Repository
Click on your profile icon → “Your repositories” → Select the forked repo you want to delete. - Go to Repository Settings
On the repo’s main page, click the “Settings” tab (you must be the owner of the fork to see this option). - Scroll Down to the Danger Zone
At the bottom of the settings page, you’ll find the “Danger Zone” section. - Click “Delete this repository”
- Click the red “Delete this repository” button.
- GitHub will ask you to confirm by typing the full repository name (e.g.,
username/repo-name
). - Click “I understand the consequences, delete this repository.”
- ✅ Done!
The forked repository will be permanently deleted from your account.
⚠️ Things to Keep in Mind
- Deleting a forked repository does not affect the original repository.
- Once deleted, issues, pull requests, and forks associated with your fork are also permanently removed.
- Make sure to back up any local changes before deleting.
🧠 Tip: Remove Local Clone (Optional)
If you cloned the repo locally, you can delete the folder manually, or via terminal:
rm -rf repo-name
📋 Summary Table
Task | How to Do It |
---|---|
Access settings | Go to forked repo > Settings tab |
Delete repository | Scroll to “Danger Zone” > Delete |
Confirm deletion | Type repo name and confirm |
Local cleanup (optional) | Delete folder manually or use rm -rf |