How To Delete a Repository in GitHub in 2024

Download Now: Free HTML & CSS Coding Templates
Madhu Murali
Madhu Murali



GitHub is the premier tool for building a coding portfolio for programmers and hobbyists alike, but projects can pile up, so clearing up space ensures you don’t hit your storage limit. This is when it is time to delete your GitHub repositories that are doing nothing but taking up space.

Man learning how to delete his old GitHub repository from his coding prodigy daughter

Download Now: 50 Code Templates [Free Snippets]

You might be wondering if the GitHub delete repository process is daunting. We’ll take you through the process step by step to make things as easy as possible.

What to Know Before You Delete Your Repository

Deleting your repository is a permanent action that CANNOT be undone. According to GitHub: “[Deleting a repository] will permanently delete the repository, wiki, issues, comments, packages, secrets, the workflow runs, and remove all collaborator associations.” So, before you undergo this process, make sure to consider your options:

  • Forking: Forking your repository makes a copy you can edit, change, etc., without affecting the original repository. This is also a great option if you want to save a copy before deleting your repository altogether.
  • Changing Visibility: You can edit your repository to private so that only you can access it if you need to for any reason. This won’t clear up space, but it will prevent others from seeing your repository.
  • Archiving: If you archive your repository, you can still fork it and read it, but you can’t make any changes unless you unarchive it. Note that archiving a repository does NOT free up any disk space.

If, after considering all of these options, you still want to delete your repository, follow these steps.

How to Delete a Repository in GitHub

Ready to delete your GitHub repository? It only takes a few simple steps. Let’s begin.

image showing the dropdown menu from account and pointing to 'your repositories'

Log in to your GitHub and go to the top right corner of the screen. Click on the arrow adjacent to e your profile icon, and click ‘Your repositories.’ From there, click on the repository you want to delete.

arrow pointing to the 'settings' section in GitHub

Scroll down to the bottom of the page, where you will see the ‘Danger Zone.’

arrow pointing to 'delete this repository' in the DANGER ZONE

Go ahead and click ‘Delete this repository.’ This should prompt a popup that asks if you are absolutely sure you want to delete the repository.

arrow pointing to delete button

You will be prompted to enter your password, after which your repository will be gone forever. You will be taken back to your GitHub homepage, where you should be met with a banner at the top confirming that your repository has been deleted. arrow pointing to text that confirms that your repository was deleted

GitHub Remove Repository Tutorial Made Simple

And that’s it. You are now ready to delete all your old repositories to free up space for your new ideas and creative projects. Happy creating!

New Call-to-action

Related Articles

Dozens of free coding templates you can start using right now

    CMS Hub is flexible for marketers, powerful for developers, and gives customers a personalized, secure experience