---
title: "Remove a site collection or a site"
slug: "remove-a-site-collection-or-a-site-1188175"
abstract: "In SXA, you can remove site collections and sites and all related items by using scripts."
---
# Remove a site collection or a site

Inevitably, you will need to remove site collections or sites.  You can use a script to remove site collections, site collection folders, sites, site folders, and all the media items and template folders that are created during the scaffolding process. Depending on what you want to remove, there are scripts  available to remove site collection folders, site collection, site folders, and sites.

To remove a site collection, site, or folder:

1. In the Content Editor, right-click the site collection, site, or folder that you want to remove. 
2. Click **Scripts** and then, depending on what you want to remove, select **Remove Site Collection**, **Remove Site**, **Remove Site Collection Folder**, or **Remove Site Folder**.

    ![headless-remove-site-collection.png](https://doc.sitecore.com/api/markdown-image/xp/en/developers/sxa/105/sitecore-experience-accelerator/images/headless-remove-site-collection.png)

3. In the **Message** dialog box, to confirm that you want to remove, for example, the site collection, click **OK**.

    SXA now runs a script to remove the site collection, site, or folder and all the related templates and media files.