Do you have an old project on GitHub that’s no longer active or needed? Deleting old repositories (repo) cleans up your account for any potential future employers looking at your code. Here’s how it’s done.

What You Need to Know Before Deleting a GitHub Repository

You can delete a repo at any time if you’re the organization owner or have admin rights. When a repo is deleted, you can sometimes restore it under certain conditions. However, there are still some serious consequences that occur when deleting a repo—even if you manage to recover it.

Deleting a private repository also deletes all forks (online copies) of that repo. However, if you delete a public repo, the forks will still exist.

Removing a repository will also delete any associated issues, attachments, team permissions, and comments. If you think you may need to reference some of this material in the future, don’t delete the repo, as this can’t be undone.

RELATED: How (and Why) to Create a GitHub Repository

How to Delete a GitHub Repository

If you’re sure that you want to delete your repository, open the GitHub website in your browser of choice and log in to your account. Next, click the repo that you want to delete in the “Repositories” group in the left-hand pane.

Select the “Settings” button under the repo’s analytics.

Now scroll to the bottom of the Settings page until you see the Danger Zone section. Here, click “Delete This Repository.”

A pop-up message will appear warning you that the action is permanent and prompting you to type the repo name to confirm. Read the warning carefully, type your repo name in the text box, and then click “I understand the consequences, delete this repository.”

The GitHub repository will be deleted.