To archive a GitHub repository, go to Settings, scroll to the Danger Zone, and click "Archive this repository." Archiving makes the repository read-only — no one can push code, open issues, or merge pull requests. It's a safer alternative to deleting because you keep all your code and history. You can unarchive at any time to resume development.
Why Archive Instead of Delete?
When a project is finished, abandoned, or no longer maintained, you have two options: delete or archive. Deleting permanently removes the repository and all its history — there's no undo. Archiving, on the other hand, puts the repository into a read-only state. All the code, commits, issues, and pull requests remain visible, but no one can make changes. This is especially valuable if you built your project with an AI tool like Lovable or V0 and want to preserve the generated code as a reference for future projects. Archived repositories still appear on your profile (marked with an "Archived" badge), and anyone with access can still read the code and clone it. Think of archiving as putting a project on a shelf rather than throwing it away.
Prerequisites
- A GitHub account with a repository you own
- Admin permissions on the repository
- A web browser with internet access
Step-by-step guide
Open your repository's Settings tab
Open your repository's Settings tab
Navigate to the repository you want to archive on github.com. Click the "Settings" tab in the row of tabs near the top of the page (Code, Issues, Pull requests, Actions, Settings). You need admin permissions to see this tab — if it's not visible, you're not the repository owner or admin. The Settings page opens to the General section by default.
Expected result: You see the Settings page with the General section displayed.
Scroll down to the Danger Zone
Scroll down to the Danger Zone
On the General settings page, scroll all the way to the bottom. You'll find a section with a red border labeled "Danger Zone." This section contains high-impact actions: changing visibility, transferring ownership, archiving, and deleting. These actions are grouped in the Danger Zone because they have significant consequences. Look for the row that says "Archive this repository."
Expected result: You can see the Danger Zone section with the "Archive this repository" option.
Click Archive this repository
Click Archive this repository
In the Danger Zone, find the "Archive this repository" row and click the "Archive this repository" button on the right side. GitHub will show a confirmation dialog explaining what archiving means: the repository becomes read-only, no commits can be pushed, no issues or pull requests can be created, and no comments can be added. You'll need to type the repository name to confirm. Type it exactly as shown (it's case-sensitive), then click the confirmation button.
Expected result: The repository is archived. A yellow banner reading "This repository has been archived by the owner. It is now read-only." appears at the top.
Verify the archived state
Verify the archived state
Go back to the repository's main page by clicking the "Code" tab. You should see a prominent yellow banner at the top of the page stating the repository is archived and read-only. The repository name on your profile will also display an "Archived" badge. Try clicking "Add file" or the "Issues" tab — you'll notice that creating new content is disabled. All existing code, issues, and pull requests remain visible for anyone with access.
Expected result: The yellow archived banner is visible, and all write operations (new files, issues, PRs) are disabled.
Disconnect external services if needed
Disconnect external services if needed
If the repository was connected to Lovable, Vercel, or other deployment tools, those services may show errors when they try to push updates or deploy. Go to your Lovable project settings and disconnect the GitHub integration if you no longer need it. For Vercel, you can either delete the project or leave it — the last successful deployment will continue to be served. For Cursor, the local clone still works for reading, but you won't be able to push changes.
Expected result: External services are disconnected or acknowledged, and no error notifications are being triggered.
Complete working example
1# Project Name (Archived)23> **This project is archived and no longer maintained.**4> The code is preserved as a reference. No pull requests or issues will be reviewed.56## What This Was78A task management app for small teams, built with Lovable and Supabase.910## Why It Was Archived1112- Project completed and handed off to the client13- No further development planned14- Code preserved for reference and portfolio1516## Tech Stack1718- React + TypeScript + Tailwind CSS19- Supabase (database + auth)20- Originally deployed on Vercel (deployment may be inactive)2122## Can I Use This Code?2324Yes. This repository is public and MIT licensed.25Feel free to fork it and build on top of it.2627## License2829MITCommon mistakes when archiving a GitHub Project (And Why It's Better Than Deleting)
Why it's a problem: Deleting a repository instead of archiving it
How to avoid: Deletion is permanent and cannot be undone (after a short grace period). Always archive first. If you later decide you truly don't need it, you can delete the archived repo.
Why it's a problem: Forgetting to merge open pull requests before archiving
How to avoid: Review all open PRs before archiving. Once archived, PRs cannot be merged. You'll need to unarchive first if you missed one.
Why it's a problem: Not disconnecting Lovable or Vercel before archiving
How to avoid: Connected services will fail silently or show errors. Disconnect integrations in Lovable settings and Vercel project settings after archiving.
Why it's a problem: Thinking archived means hidden
How to avoid: Archived public repositories are still visible to everyone. If you want to hide the code, change visibility to private before or after archiving.
Best practices
- Always archive instead of deleting unless you have a specific reason to permanently remove the code
- Merge or close all open pull requests before archiving
- Update the README to note that the project is archived and why
- Disconnect Lovable, Vercel, and other deployment services to avoid error alerts
- Make the repository private before archiving if the code should not be publicly visible
- Keep archived repositories as references for future projects built with similar tech stacks
- Review archived repos periodically — unarchive if you decide to resume development
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to archive my GitHub repository that is connected to Lovable and deployed on Vercel. Give me a step-by-step checklist of everything I should do before and after archiving to avoid breaking anything.
Frequently asked questions
Can I unarchive a GitHub repository?
Yes. Go to the archived repository's Settings → Danger Zone → "Unarchive this repository." The repository returns to its normal state, and all write operations are re-enabled immediately.
Can people still see an archived repository?
Yes. If the repository is public, anyone can view the code, issues, and pull requests. If it's private, only collaborators with access can see it. Archiving does not change visibility.
Can I fork an archived repository?
Yes. Archived repositories can be forked and cloned. The fork will be a normal, active repository where you can make changes freely.
Will my Vercel deployment keep working after archiving?
The existing deployment stays live — archiving doesn't take down deployed sites. However, Vercel won't be able to rebuild if triggered, since it can't pull from an archived repo. Consider this when deciding whether to keep the deployment active.
Does archiving affect GitHub Actions workflows?
Yes. All GitHub Actions are disabled in archived repositories. No workflows will run, including scheduled ones. They resume automatically if you unarchive.
Should I archive repositories created by AI tools like Lovable?
Yes, if the project is complete or abandoned. Archiving preserves the AI-generated code as a reference while preventing accidental changes. It's especially useful if you've moved on to a new version of the project.
Can RapidDev help me manage multiple archived projects?
Yes. If you have many repositories from prototyping with AI tools, RapidDev can help organize, archive, or consolidate them into a clean portfolio structure.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation