---
title: "Unable to use a specific space key when copying a space"
canonical: "https://support.appfire.com/space/COPYSP/836864257/Unable%20to%20use%20a%20specific%20space%20key%20when%20copying%20a%20space"
format: markdown
---
> Macro (aura-html)

## Problem

> ❌ When copying a space, following errors occur:
> ❌ 
> ❌ `ERROR Space with a key "<key name>" already exists and is marked as a type 'trashed'. Please purge it before copying. Documentation (<key name>)6.3s `
> ❌ 
> ❌ `ERROR creating space: Error creating space: space with a key "<key name>" already exists and is marked as a type 'trashed'. Please purge it before copying. (<key name>) `
> ❌ 
> ❌ `Error creating space: space with a key "<key name>" already exists and is marked as a type 'trashed'. Please purge it before copying.`

## Cause

Usually, a similar error occurs when you are trying to copy a space that already exists. This particular error occurs when the space key of a deleted space is provided when copying another space. 

## Solution

Remember:

- When deleting a space, Confluence does not actually delete the space; it is trashed.
- A trashed space remains in this state until restored or permanently deleted. This means that the space key already exists and thus, is not available for use.

Read this [Atlassian article](https://support.atlassian.com/confluence-cloud/docs/delete-a-space/#Permanently-delete-a-space) about deleting spaces to learn more.

To resolve these errors, you must:

1. Navigate to :conf_settings:  > **Settings** (in the left sidebar) > **Admin tools** > **Spaces** > **Trashed** to see the list of deleted spaces.  
Or, from the main menu bar, select **Spaces** > **View all spaces**.   
Apply a page filter with value *Trashed*, and click the **Space settings** button to see all trashed spaces.
2. Find the relevant space in the list with the required space key and click **Permanently delete space**.
3. Retry the space copying with the required space key.