Restoring a deleted repository

You can restore some deleted repositories to recover their contents.

In this article

Anyone can restore deleted repositories that were owned by their own user account. Organization owners can restore deleted repositories that were owned by the organization.

About repository restoration

A deleted repository can be restored within 90 days, unless the repository was part of a fork network that is not currently empty. A fork network consists of a parent repository, the repository's forks, and forks of the repository's forks. If your repository was part of a fork network, it cannot be restored unless every other repository in the network is deleted or has been detached from the network. For more information about forks, see "About forks."

If you want to restore a repository that was part of a fork network that is not currently empty, you can contact GitHub Support or GitHub Premium Support.

It can take up to an hour after a repository is deleted before that repository is available for restoration.

Restoring a repository will not restore release attachments or team permissions.

Restoring a deleted repository that was owned by a user account

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Settings icon in the user bar

  2. In the left sidebar, click Repositories.

    Repositories tab

  3. Under "Repositories", click Deleted repositories.

    Deleted repositories tab

  4. Next to the repository you want to restore, click Restore.

    Restore button

  5. Read the warning, then click I understand, restore this repository.

    Button to confirm restoration

Restoring a deleted repository that was owned by an organization

  1. In the top right corner of GitHub, click your profile photo, then click Your profile.

    Profile photo

  2. On the left side of your profile page, under "Organizations", click the icon for your organization.

    organization icons

  3. Under your organization name, click Settings.

    Organization settings button

  4. In the left sidebar, click Deleted repositories.

    Deleted repositories tab

  5. Next to the repository you want to restore, click Restore.

    Restore button

  6. Read the warning, then click I understand, restore this repository.

    Button to confirm restoration

Further reading

Ask a human

Can't find what you're looking for?

Contact us