Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-03-26. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Deleting a GitHub Pages site

You can delete a GitHub Pages site.

Who can use this feature?

People with admin or maintainer permissions for a repository can delete a GitHub Pages site.

GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

Deleting your site

You can delete your site in two ways:

If you want to remove the current deployment of your site but do not want to delete the site, you can unpublish your site. For more information, see "Unpublishing a GitHub Pages site."

Deleting your site by changing the source

  1. On GitHub Enterprise Server, navigate to your site's repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the "Code and automation" section of the sidebar, click Pages.

  4. Under "Build and deployment", under "Source", select Deploy from a branch even if the site is currently using GitHub Actions.

  5. Under "Build and deployment", use the branch dropdown menu and select None as the publishing source. Screenshot of Pages settings in a GitHub repository. A menu to select a branch for a publishing source, labeled "None," is outlined in dark orange.

  6. Click Save.