Restoring a deleted repository

Site administrators can restore deleted repositories to recover their contents.

Usually, if someone deletes a repository, it will be available on disk for 90 days and can be restored via the site admin dashboard. Unless a legal hold is in effect on a user or organization, after 90 days the repository is purged and deleted forever.

About repository restoration

If a repository was part of a fork network when it was deleted, the restored repository will be detached from the original fork network.

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. Issues that are restored will not be labeled.

Restoring a deleted repository

  1. From an administrative account on GitHub Enterprise Server, click in the upper-right corner of any page. Rocketship icon for accessing site admin settings
  2. In the search field, type the name of the user or organization and click Search. Site admin settings search field
  3. In the search results, click the name of the user or organization. Site admin settings search options
  4. In the Repositories section, click the Deleted repositories link.
  5. Find the repository you want to restore in the deleted repositories list, then to the right of the repository name click Restore.
  6. To confirm you would like to restore the named repository, click Restore.

Further reading

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.